Can't determine which overloaded function to call for override constructor
Original Reporter info from Mantis: hnb
-
Reporter name: Maciej Izak
Original Reporter info from Mantis: hnb
- Reporter name: Maciej Izak
Description:
Can't determine which overloaded function to call for override constructor. In Delphi all is ok. I see no reason for that error (now to compile example I need to reimplement all constructors from TA - in normal code this is a big problem!):
---program---
{$MODE DELPHI}
type
TA = class
public
constructor Create(A: Integer = 0); virtual; overload;
constructor Create(A: string); virtual; overload;
end;
TB = class(TA)
public
constructor Create(A: string); override;
end;
constructor TA.Create(A: Integer);
begin
end;
constructor TA.Create(A: string);
begin
end;
constructor TB.Create(A: string);
begin
end;
var
B: TB;
begin
B := TB.Create; // Error: Can't determine which overloaded function to call
end.
Mantis conversion info:
- Mantis ID: 25607
- Build: 26466
- Version: 2.7.1
- Fixed in version: 3.1.1
- Fixed in revision: 35089 (#18077d95)