[fpc-pascal] Nested generic parameters

Sven Barth pascaldragon at googlemail.com
Tue Feb 4 13:47:28 CET 2014


Am 04.02.2014 11:48, schrieb Constantine Yannakopoulos:
> 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.
>
Yes, that is not supported yet. Please report as a bug, so that it is 
not forgotten (and attach a simple example that compiles in Delphi).

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140204/8d9002c3/attachment.html>


More information about the fpc-pascal mailing list