fpc/tests/test/tgeneric32.pp

21 lines
291 B
ObjectPascal

program tgeneric32;
{$MODE DELPHI}
{$APPTYPE CONSOLE}
type
TFoo<T> = class
constructor Create;
end;
constructor TFoo<T>.Create;
begin
inherited Create;
end;
var
FooInt: TFoo<Integer>;
begin
// check inline specialization
FooInt := TFoo<Integer>.Create;
FooInt.Free;
end.