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?
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to