[fpc-devel] Ambiguity between function result and overloaded function
luiz americo pereira camara
luizmed at oi.com.br
Mon Jan 5 21:20:52 CET 2015
I have the following methods.
I was expecting that Result := Save; would call Save method but in fact
Save refers to the function result variable.
Is it by design?
function TSqlite3JSONObjectResource.Save(IdValue: Variant): Boolean;
if not VarIsEmpty(IdValue) then
Result := Save; <- this does not call the overloaded method
Result := Save(); <- this calls the overloaded method
function TSqlite3JSONObjectResource.Save: Boolean;
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel