{$MODE OBJFPC} program Test; type generic TFoo = class type protected TTest = Cardinal; public FTest: Cardinal; end; begin end.