[fpc-pascal] Surprise. Comparison of method is only done on the routine address

Michael Van Canneyt michael at freepascal.org
Tue Jul 12 09:07:21 CEST 2016

On Tue, 12 Jul 2016, Dennis wrote:

> I always thought comparison of methods is done on both the data and the code 
> part.
>       TMethod = record
>         Code : CodePointer;
>         Data : Pointer;
>       end;
> But the following proves it is NOT.
> What is the rationale behind such behavior?

AFAIK: Delphi compatibility.

Someone already made a remark about this, and this fact is now documented, it
should appear when 3.0.2 is out.


More information about the fpc-pascal mailing list