[fpc-devel] generic and type compatibility / interface vs class ...
Hairy Pixels
genericptr at gmail.com
Tue Feb 3 15:37:04 CET 2026
SomeClassInstanceThatImplementsFoo is a variable? variables should never
be never allowed within <>, which only allow types and constants.
On Feb 3, 2026 at 9:16:28 PM, Michael Van Canneyt via fpc-devel <
fpc-devel at lists.freepascal.org> wrote:
>
>
> On Tue, 3 Feb 2026, Martin Frb via fpc-devel wrote:
>
> ok, so if I have
>
> procedure bar(f: IntfFoo);
>
>
> I can do
>
> bar(SomeClassInstanceThatImplementsFoo);
>
>
> makes sense, the interface can be gotten at the time of calling.
>
>
> Now if I have
>
>
> generic MyGen< P: IntfFoo >
>
>
> then I can also do
>
> specialize MyGen<SomeClassInstanceThatImplementsFoo>
>
>
> is that indented?
>
>
> I don't think so. Sounds like a bug ?
>
> Michael.
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20260203/b9b1684f/attachment.htm>
More information about the fpc-devel
mailing list