[fpc-pascal] Function reference confuses function pointer?
Michael Van Canneyt
michael at freepascal.org
Sat Mar 4 05:38:18 CET 2023
On Fri, 3 Mar 2023, Dwight Schauer via fpc-pascal wrote:
> On 3/3/23 22:08, Hairy Pixels via fpc-pascal wrote:
>> This caused me a nasty debugging confusion, it’s a bug right? In the
> program below the two parameters passed to TBinding.Create have the same
> address despite being function pointers to two different class methods.
> Calling them both call the same method which is clearly not correct.
>>
>> Free Pascal Compiler version 3.3.1 [2022/09/28] for aarch64
>
> I modified the methods in question from your example and called them.
> They were separate.
>
> This was already addressed.
>
> https://gitlab.com/freepascal.org/fpc/source/-/issues/39981
>
> resolved in commit a714e2ff 3 months ago
I can confirm: adding code to call results in different methods being
called. Compiler of last week.
Michael.
More information about the fpc-pascal
mailing list