ToolTip shows hidden constructors
Original Reporter info from Mantis: rse
-
Reporter name:
Original Reporter info from Mantis: rse
- Reporter name:
Description:
See code in Additional Information. When I start to write "MyClass := TMyClass." then the ToolTip shows both "Create(Arg: Integer);" and "Create(Arg1, Arg2: Integer);" as Class Functions, but when I choose "MyClass := TMyClass.Create(MyInt);", then the Compiler aborts with "Error: Wrong number of parameters specified for call to "Create"", because TBaseClass.Create() is hidden by TMyClass.Create(). The ToolTip shouldn´t show TBaseClass.Create() as an option for TMyClass if it´s not usable.
Steps to reproduce:
type
TBaseClass = class(TObject)
public
constructor Create(Arg: Integer);
end;
TMyClass = class(TBaseClass)
public
constructor Create(Arg1, Arg2: Integer);
end;
var
MyClass: TMyClass;
begin
MyClass := TMyClass.[Create(Arg: Integer)|(Arg1, Arg2: Integer)] // those are the options in ToolTip
MyClass := TMyClass.(Arg: Integer); // if this one is chosen, it won´t compile, because it´s a hidden constructor
Mantis conversion info:
- Mantis ID: 15403
- OS: Windows
- OS Build: WinXP SP3
- Build: release with Lazarus 0.9.28.2
- Platform: Win32
- Fixed in revision: r40918 (#3964d7f1)
- Monitored by: » rse (rse)
- Target version: 1.4