{ %NORUN } { this tests that nested non-generic structured types can be used inside generics - here: record in record } program tgeneric63; {$ifdef fpc} {$mode delphi} {$endif} type TTest = record type TTestSub = record class function Test(a: T): T; static; end; end; class function TTest.TTestSub.Test(a: T): T; begin Result := a; end; var t: TTest.TTestSub; begin TTest.TTestSub.Test(42); end.