pascalabcnet/TestSamples/CompilationSamples/temolate_test2.pas
Бондарев Иван e6e67c193c initial commit
2015-05-14 21:35:07 +02:00

21 lines
249 B
ObjectPascal

type
Base<T> = template class
public
constructor;
begin
Writeln(self);
end;
end;
Foo = class(Base<Foo>)
constructor;
begin
inherited Create;
end;
end;
var f:Foo;
begin
f := new Foo;
readln;
end.