[fpc-devel] Compiler picks wrong overload

Ben Grasset operator97 at gmail.com
Mon May 27 03:03:27 CEST 2019


On Wed, May 22, 2019 at 12:53 PM Pascal Riekenberg <pascal at riekenberg.eu>
wrote:

> No one? This is a showstopper!
>

FWIW, you can comment out the new TBytes definitions as a temporary fix.
They are not actually used anywhere in the FPC codebase.

More broadly I think the bigger problem is FPC's internal over-eagerness to
implicitly cast things to other things... for example, if you have a type
with an ":=" operator overload (or as Delphi calls it, an "Implicit"
operator overload) from both "Pointer" and "TObject", FPC will always pick
the "Pointer" one even if given an explicit TObject variable. They
(currently) cannot co-exist. But certainly, they should be able to, if you
ask me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190526/3d29e37e/attachment.html>


More information about the fpc-devel mailing list