[fpc-pascal] Calling undefined function pointers in generics
Hairy Pixels
genericptr at gmail.com
Mon Jun 20 03:38:34 CEST 2022
NOTE: I’m replying to this and CC’ing Sven so hopefully he can see it.
> On Jun 19, 2022, at 10:05 AM, Hairy Pixels <genericptr at gmail.com> wrote:
>
> This code snippet will give a compiler error "Syntax error, ";" expected but "(“ found”. It’s an unspecialized generic type so I would think it should compile and only attempt to validate the parameters when the function is specialized.
>
> generic procedure Perform<T>(func: T);
> begin
> func(1);
> end;
>
> Regards,
> Ryan Joseph
>
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list