Any idea why this code stopped working in 10.3, is it a bug?
Any idea why this code stopped working in 10.3, is it a bug?
type
TTest = record
constructor Create(const ACommand: Integer; const AItems: TStringDynArray); overload;
end;
constructor TTest.Create(const ACommand: Integer; const AItems: TStringDynArray);
begin
end;
var
Test: TTest;
begin
// this shows
// E2250 There is no overloaded version of 'Create' that can be called with these arguments
Test := TTest.Create(1, ['test']);
end;
type
TTest = record
constructor Create(const ACommand: Integer; const AItems: TStringDynArray); overload;
end;
constructor TTest.Create(const ACommand: Integer; const AItems: TStringDynArray);
begin
end;
var
Test: TTest;
begin
// this shows
// E2250 There is no overloaded version of 'Create' that can be called with these arguments
Test := TTest.Create(1, ['test']);
end;
TStringDynArray is declared as TArray instead array of string now.
ReplyDeleteUwe Raabe I don't think it should matter. Also it works if you remove 'overload'
ReplyDeleteEugene Kotlyarov In that case I would file a QP report especially mentioning the overload thing. Could be a remnant of the disabled managed record stuff.
ReplyDelete