[fpc-pascal] Operator not overloaded

Sven Barth pascaldragon at googlemail.com
Fri Jun 24 10:43:55 CEST 2022


Thomas Kurz via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb am
Do., 23. Juni 2022, 19:45:

> When compiling, I get this error:
>
> pathfinding.pas(17,17) Error: Operator is not overloaded: "TTileSegment" =
> "TTileSegment"
>
> Which I don't understand -- because the "=" operator is defined in
> tesstypes.pas.
>
> Am I doing something wrong or is this behavior a bug?
>

Global operator overloads need to be available at the time the generic is
*declared*, not *specialized*. That is one of the reasons why advanced
records were introduced.

So you need to declare your operators as part of your record.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20220624/84d26894/attachment.htm>


More information about the fpc-pascal mailing list