Am 20.11.2016 08:31 schrieb "Le Duc Hieu" <alavi...@gmail.com>: > > Here is the complete snippet that i wanted to create > > > Type > generic PGList<T> = ^specialize TGList<T>; > > generic TGList<T> = record > data: T; > next: specialize PGList<T> > end;
You'll need to use nested types (they require modeswitch advancedrecords), like this: === code begin === type generic TGList<T> = record public type TSelf = specialize TGList<T>; PGList = ^TSelf; public data: T; next: PGList; end; === code end === Note: the TSelf construct is currently needed due to a bug in the compiler. Regards, Sven
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal