[fpc-pascal] question on generics for 3.2.2
Marco van de Voort
fpc at pascalprogramming.org
Sun Oct 25 11:52:58 CET 2026
Op 24-10-2026 om 23:07 schreef P Padil via fpc-pascal:
> Was trying to code a recursive generic function but kept getting an error:
> "Error: Global Generic template references static symtable
> A generic declared in the interface section of a unit must not reference symbols that belong solely to the implementation section of that unit.”
>
> Is there a trick to this and I missed the memo, or just not allowed? Resorted to concrete types to get it to compile.
>
Yes. If your code refers constants declare them in the body of the
function, rather than as a separate block in the function.
More information about the fpc-pascal
mailing list