[fpc-devel] Ambiguity between function result and overloaded function

Marcos Douglas md at delfire.net
Tue Jan 6 13:41:46 CET 2015


On Tue, Jan 6, 2015 at 9:15 AM, Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
>
> On 05 Jan 2015, at 21:20, luiz americo pereira camara wrote:
>
>> 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?
>
>
> Yes. See e.g. http://bugs.freepascal.org/view.php?id=22344

Hi Jonas,

There you said: "If you don't like that (by design), use the TP or
Delphi dialects as mentioned before."
If this "problem" not occurs using delphi dialects, do not you think
it's better all dialects work as Delphi works? Only in this case, of
course.

IMHO this is an inconsistency in the language. Sometimes use "()" sometimes not?

Best regards,
Marcos Douglas



More information about the fpc-devel mailing list