Order of constructors declaration may matter but shouldn't.
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
It seems that if we are using Delphi mode (I didn't try any other mode) and we use several constructors(one without parameters and others with parameters), FPC thinks that parameters for other constructors aren't used.
For the following code it reports:
bug.pas(7,36) Hint: Parameter S not used
bug.pas(14,20) Error: overloaded functions have the same parameter list
bug.pas(14,20) Error: function header doesn't match any method of this class CREATE(var ansistring)
----------
S is used, but even if it wasn't used it couldn't report they have the same parameter list.
A way to workaround this is to change the order of constructors so that the constructor without parameters is the last to be declared.
Additional information:
Reporter: Jose Santos
EMail: jcas at netcabo dot pt
Mantis conversion info:
- Mantis ID: 4651
- OS: GO32V2
- Version: 1.0.10
- Fixed in version: 1.1.0