fpc/tests/test/timpfuncspez21.pp
Sven/Sarah Barth 90844c2027 * fix #35261: 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

23 lines
315 B
ObjectPascal

{%NORUN}
{$mode objfpc}
{$modeswitch implicitfunctionspecialization}
{
Test class constraints
}
program timpfuncspez21;
type
TMyClass = class
end;
TMyChild = class(TMyClass)
end;
generic procedure DoThis<T: TMyClass>(obj: T);
begin
end;
begin
DoThis(TMyClass.Create);
DoThis(TMyChild.Create);
end.