wrong overloaded method is chosen, when they differ only in pointer to specialized class
Original Reporter info from Mantis: deep42thought
-
Reporter name: Erich Eckner
Original Reporter info from Mantis: deep42thought
- Reporter name: Erich Eckner
Description:
I have two specialized classes and pointer types to them. These classes contain overloaded functions, which take a variable of either pointer type as argument. However, it is always the first method, that is being called. It does not help to explicitly cast the pointer on the call, either.
This leads to trouble, because the de-referenced pointers behave differently (e.g. differing sizeof()).
Steps to reproduce:
take the attached program and do
fpc -MObjFPC mwe.pas
./mwe
Additional information:
This definitely worked before (maybe not exactly my minimal working example, but the actual program which uses similar structures), but I am unable to find, when exactly it broke - apparently, it was broken in 3.2.0 already ...
Mantis conversion info:
- Mantis ID: 38680
- OS: Arch Linux
- Build: r47406
- Platform: Linux
- Version: 3.3.1
- Monitored by: » deep42thought (Erich Eckner), » @PascalDragon (Sven Barth)