[fpc-pascal] Fpc 3.0 Bug: type specialization and operator overload

Sven Barth pascaldragon at googlemail.com
Sun Mar 13 01:45:10 CET 2016

Am 12.03.2016 22:45 schrieb "Mazola Winstrol" <mazofeifer at gmail.com>:
> Hello,
> Fpc version: 3.0 (the one provided by Lazarus).
> Please confirm if this is a bug regarding operator overloading and type
specialization. It is a quite difficult to explain, but i will try.
> It seems the compiler treats the type MyRecordDefinitionA.TMyRecord and
MyRecordDefinitionB.TMyRecord as being the same type. So, the compiler try
to apply the logical operator and of MyRecordDefinitionB.TMyRecord in the
integer specialization of the type MyRecordDefinitionA.TMyRecord.

It does not treat them the same, it simply picks the wrong one (as in
"doesn't correctly respect the unit qualifier"). You should see a different
(yet no less wrong) behavior if you turn around the units in the

Please report.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160313/7f57141a/attachment.html>

More information about the fpc-pascal mailing list