[fpc-devel] generic and type compatibility / interface vs class ...

Michael Van Canneyt michael at freepascal.org
Tue Feb 3 16:08:47 CET 2026



On Tue, 3 Feb 2026, Martin Frb via fpc-devel wrote:

> On 03/02/2026 15:37, Hairy Pixels via fpc-devel wrote:
>> SomeClassInstanceThatImplementsFoo is a variable? variables should 
>> never be never allowed within <>, which only allow types and constants.
> Ah, sorry, copy and paste.
>
> Its a var for the function call.
>
> The specrialize should have read
>      specialize MyGen<Some__Class__ThatImplementsFoo>
>
> So I have a constrained that wants an interface, but I can specialize 
> with a class.

That should not work when you're defining a type.

Michael.


More information about the fpc-devel mailing list