mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 17:47:56 +02:00

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
23 lines
315 B
ObjectPascal
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. |