Paul Ishenin schreef:
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 guess overload can be removed.


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]


I don't think it will fail. Overload is not required in mode objfpc as it is in Delphi.

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

Reply via email to