program tgeneric34; {$mode delphi} type TFoo = record function DoSomething(Arg: T): T; end; function TFoo.DoSomething(Arg: T): T; begin Result := Arg; end; var FooInt: TFoo; begin if FooInt.DoSomething(1) <> 1 then halt(1); end.