Add missing overload directives in TBasicDrawer class (tachart/tadrawutils.pas)
Original Reporter info from Mantis: Jonas @jmaebe
-
Reporter name: Jonas Maebe
Original Reporter info from Mantis: Jonas @jmaebe
- Reporter name: Jonas Maebe
Description:
TBasicDrawer implements two overloads of LineTo and MoveTo, but without the overload directive.
TCanvasDrawer inherits from TBasicDrawer. It overrides one of the LineTo and one of the MoveTo methods from TBasicDrawer. This means that normally, the other overload gets hidden (won't be found by the compiler when you try to call these methods).
However, the TCanvasDrawer class also implements the IChartDrawer interface. This interace also declares both overloads of the LineTo and MoveTo.
Until now, the compiler mapped one of the interface methods to TCanvasDrawer.LineTo/MoveTo and the other one to the non-overridden TBasicDrawer.LineTo/MoveTo. That is incorrect due to the missing overload directive. Instead, it should complain that it cannot find a mapping for the remaining LineTo/MoveTo methods. It does so since FPC trunk r40683.
I have attached a patch to add the missing overload directives.
Steps to reproduce:
make bigide
Mantis conversion info:
- Mantis ID: 34774
- Platform: All
- Version: 2.2
- Fixed in version: 2.0
- Fixed in revision: 59935 (#c8835c76)
- Target version: 2.0