I suggest a modification to your example:
Please observe this: http://pastebin.com/9axN51QE
If you declare a base class with reintroduced constructor (like I
suggest) then you may prevent FreePascal compiler from seeing
TObject.Create constructor. Therefore it will determine which
Maciej Izak schrieb:
Following by current logic, this example should not compile:
--begin code--
TA = class
procedure Foo;
end;
TB = class(TA)
procedure Foo(A: Integer = 0); overload;
end;
var
b: TB;
begin
b := TB.Create;
b.Foo; // should raise Error: Can't determine which