Am 10.11.2016 04:30 schrieb "African Wild Dog" <paintedlyc...@gmail.com>: > > 2016-11-07 14:15 GMT-02:00 Sven Barth <pascaldra...@googlemail.com>: >> >> Am 07.11.2016 15:58 schrieb "African Wild Dog" <paintedlyc...@gmail.com>: >> > It is intended to change such compiler behavior in the future? It is incompatible with Delphi and moreover it force us to break the encapsulation of the Generic types. >> >> I can't answer this without you providing an example that fails. > > > Sorry for the noise. Some of my classes were bad designed. They look like this sample (Delphi XE 6 compiles): > > ==== CODE BEGIN ==== > > unit sample; > > {$MODE delphi} > > interface > > type > TGenericRecord<T> = record > strict private > Interf: IInterface; > type > TMockIntfObject<T> = record // Nested generic declaration > end; > > public > FValue: T; > procedure SetValue(Value: T); > end; > > implementation > > { TGenericRecord<T> } > > procedure TGenericRecord<T>.SetValue(Value: T); > begin > Interf := TMockIntfObject.Create; > end; > > end. > > > ==== END ==== > > > With fpc i got the error "Fatal: Declation of generic class inside another generic class is not allowed".
Nested generics are currently indeed not supported. They are on my ToDo list however. Regards, Sven
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal