[fpc-pascal] Nested generic parameters

Constantine Yannakopoulos alfasud.ti at gmail.com
Tue Feb 4 11:48:44 CET 2014


Hello again,

Can I use a defined generic type parameter inside a constraint of the same
generic declaration on FPC trunk code? Something like:



{$mode Delphi}


type
  TFoo<T> = class
  end;

  TGeneric<T, U: TFoo<T>> = class
  end;

This compiles in Delphi XE or later but in FPC it gives the error
"Identifier not found 'T'" at the T parameter in the constraint.

Thanks in advance.

--Constantine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140204/f7d6307c/attachment.html>


More information about the fpc-pascal mailing list