[Lazarus] overloaded proc not found
Marc Santhoff
M.Santhoff at web.de
Wed Sep 5 09:56:18 CEST 2012
Hi,
is there any problem with overloading in fpc2.6.0? Or another change
making lazarus behave like this:
<snip>
// ncore.pas
TnkDOMTree = class( TXMLDocument )
public
...
end;
function LoadTnkTreeTreeFromXMLFile(fname: string): TnkDOMTree;
var
t: TnkDOMTree;
begin
t := NIL; { avoid warning }
try
XMLRead.ReadXMLFile(t, fname); // <-- line 82, errror spot
except
on e: exception do begin
FreeAndNil(t);
end;
end;
result := t;
end;
// XMLRead.pas, from line 44:
procedure ReadXMLFile(out ADoc: TXMLDocument; const AFilename: String); overload;
procedure ReadXMLFile(out ADoc: TXMLDocument; var f: Text); overload;
procedure ReadXMLFile(out ADoc: TXMLDocument; f: TStream); overload;
procedure ReadXMLFile(out ADoc: TXMLDocument; f: TStream; const ABaseURI: String); overload;
</snip>
Compiler says on "build all":
ncore.pp(82,33) Error: Incompatible type for arg no. 2: Got "AnsiString", expected "TStream"
Compiler is:
$ fpc -i
Free Pascal Compiler version 2.6.0
Compiler Date : 2011/12/30
Compiler CPU Target: x86_64
...
I did not change anything in the source, but the machine is now on 64
bit OS and was 32 bit. And I updated lazarus (from 2012-07-05, SVN
35971). Those lines compiled and ran fine, and I think they should do
now, too. I've tried deleting all .o and .ppu of the program, no change.
TIA,
Marc
--
Marc Santhoff <M.Santhoff at web.de>
More information about the Lazarus
mailing list