[fpc-devel] TRegistry, TRegIniFile

Paul Ishenin ip at kmiac.ru
Mon May 12 04:30:32 CEST 2008


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.




More information about the fpc-devel mailing list