[fpc-devel] generic and type compatibility / interface vs class ...
Hairy Pixels
genericptr at gmail.com
Tue Feb 3 16:58:11 CET 2026
On Feb 3, 2026 at 10:42:05 PM, Martin Frb via fpc-devel <
fpc-devel at lists.freepascal.org> wrote:
> https://gitlab.com/freepascal.org/fpc/source/-/issues/41604
>
program Project1;
{$Mode objfpc}
{$Interfaces CORBA}
type
IFoo = interface end;
TBar = class(TObject, IFoo) end;
generic MyGen<A: IFoo> = class end;
TSome = specialize MyGen<TBar>;
begin
end.
ok so I can see the whole thing now and this should compile. TBar
implements IFoo and "A" must conform to IFoo so TBar is compatible with "A".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20260203/7387e7da/attachment-0001.htm>
More information about the fpc-devel
mailing list