[fpc-devel] Attn: Sven Can not use "specialize" to resolve forward declaration
Martin Frb
lazarus at mfriebe.de
Thu Dec 9 00:09:24 CET 2021
https://gitlab.com/freepascal.org/fpc/source/-/issues/39459
You wrote
>> No, this can not and this will never work. When a generic parameter
has a constraint that constraint /must/ be adhered to and a forward
declaration is /not/ a valid type for such a constraint (except for
*class* / |TObject| constraints).
Using TObject for just any class is nice here.
What to use for interface?
https://gitlab.com/freepascal.org/fpc/source/-/issues/39459#note_758496897
Sorry replied on the wrong issue.
How can I restrain a generic param, so it must be an interface, but
leave open the exact type, so I can later use a forward declaration?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20211209/d532b9b4/attachment.htm>
More information about the fpc-devel
mailing list