Hello,  FPC developers' list.

Why

TRegistry = class(TObject)
...
public
  constructor Create; overload;
  constructor Create(aaccess:longword); // <<-- no overload
...

TRegIniFile = class(TRegistry)
...
public
  constructor Create(const FN: string);  // <<-- no overload
  constructor Create(const FN: string;aaccess:longword); overload;
...

Is this by design that 2 constructors miss "overload" keyword in the declaration? Delphi has overload everywhere.

I suppose this cause this code to fail with message:

[code]
var
  fReg: TRegIniFile;
begin
  fReg := TRegIniFile.Create;
end;
[/code]

[message]
Error: Incompatible types: got "constructor TRegIniFile.Create(const AnsiString)" expected "TRegIniFile"
[/message]

Is it possible to correct if it is not by design in both trunk and fixes_2_2?

--
Best regards,
Paul Ishenin.

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to