fpc/tests/test/timpfuncspez9.pp
Sven/Sarah Barth 90844c2027 * fix : apply slightly adjusted changes by Ryan Joseph to implement support for implicit generic function specializations
The main adjustments were as follows:
  - fixing coding style and identation
  - fixing some typos
  - using a better name for the property in tcallcandidates which holds the symbols created for anonymous parameter values
2022-04-20 18:59:31 +02:00

29 lines
449 B
ObjectPascal

{%NORUN}
{$mode objfpc}
{$modeswitch implicitfunctionspecialization}
{
Test generic object methods
}
program timpfuncspez9;
type
TMyObject = object
generic class procedure Call<T>(msg: T); static;
generic procedure DoThis<T>(msg: T);
end;
generic class procedure TMyObject.Call<T>(msg:T);
begin
end;
generic procedure TMyObject.DoThis<T>(msg:T);
begin
end;
var
rec: TMyObject;
begin
TMyObject.Call('Hello World');
rec.DoThis(1);
end.