tb0623.pp 450 B

12345678910111213141516171819202122232425262728
  1. { %NORUN }
  2. program tb0623;
  3. {$mode objfpc}
  4. {$modeswitch advancedrecords}
  5. type
  6. generic TTest<T> = record
  7. public type
  8. PSelf = ^specialize TTest<T>;
  9. public
  10. Next: PSelf;
  11. end;
  12. generic TTest2<T> = record
  13. Next: ^specialize TTest2<T>;
  14. end;
  15. TTestLongInt = specialize TTest<LongInt>;
  16. TTestString = specialize TTest<String>;
  17. TTest2LongInt = specialize TTest2<LongInt>;
  18. TTest2String = specialize TTest2<String>;
  19. begin
  20. end.