{$MODE OBJFPC} { -*- text -*- } program tests; type TFoo = class procedure Test(); end; generic TBar = class(Parent) end; TBarOfFoo = specialize TBar ; procedure TFoo.Test(); begin end; var BarOfFoo: TBarOfFoo; begin BarOfFoo := TBarOfFoo.Create(); BarOfFoo.Test(); BarOfFoo.Free(); end.