[fpc-pascal] Record Constructors which differ in parameter lists

Michael Van Canneyt michael at freepascal.org
Wed May 10 16:11:06 CEST 2023



On Wed, 10 May 2023, Thomas Kurz via fpc-pascal wrote:

> Dear Michael,
>
> thank you for the explanation. I understand that the helper overwrites the original constructor. But...
>
> I have defined "type TSomething = type TVec3f" (note the second "type"). 
> So from my perspective, I'd assume that the TSomethingHelper doesn't apply
> to TVec3f at all because TSomething is defined as a new type, not only an
> alias for TVec3f.

I would expect the type helper to remain functional. The types are the same
for all purposes except they have a different RTTI entry.

But the exact behaviour of the compiler in this case is something that Sven
Barth will need to explain...

Michael.


More information about the fpc-pascal mailing list