Re: Override constructor in class helper?

Sven Barth via fpc-pascal <[email protected]> Thu, 27 Nov 2025 23:46:46 +0100
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <CAFMUeB9FsDi+HP6u2rGZcRVUByVDEdG5HLMKBY6zPxLzFjd7Lg@mail.gmail.com>
Thomas Kurz via fpc-pascal <[email protected]> schrieb am
Do., 27. Nov. 2025, 11:33:

> Both ChatGPT and Gemini agree that this won't work because FPC resolves
> Create in this order:
> 1. Look at the real class (TStringList) for a matching constructor.
> 2. Only if no such method exists, check helpers in scope for a matching
> name.
>

What about asking real people from the beginning instead of stochastic
parrots?
Declaring constructors in helpers is indeed supported.

Regards,
Sven

_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal