Am 18.10.2025 um 22:39 schrieb Bart via fpc-devel:
On Fri, Oct 17, 2025 at 9:33 PM Sven Barth via fpc-devel
<[email protected]> wrote:
David's problem is *not* due to a corruction or a bug, but due to an
optimization that FPC performs that leads to different behavior, namely
changing virtual methods that are empty to EmptyMethod to reduce the
number of duplicate (empty) methods in the binary.
Does that mena that such a check is in essence invalid?
IIRC then we have such a check in TCustomEdit in LCL....
Well, the language does neither explicitly forbid nor allow it... So
you'd have to do a more complete check that includes both the real base
method as well as System.EmptyMethod. Maybe best move the general check
to a separate function which gets passed both method pointers and then
compares those as well as the base one against EmptyMethod. Regards, Sven_______________________________________________
fpc-devel maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel