program tgeneric24; {$mode objfpc}{$H+} {$apptype console} type generic TFoo = record F: T; end; var FooInt: specialize TFoo; FooStr: specialize TFoo; begin FooInt.F := 1; WriteLn(FooInt.F); FooStr.F := 'test'; WriteLn(FooStr.F); end.