[Issue 5749] argument evaluation order of chained function from right

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 18 13:40:48 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5749



--- Comment #3 from Steven Schveighoffer <schveiguy at yahoo.com> 2011-03-18 13:37:35 PDT ---
If you consider that 'this' is the first argument to the opCall, you would
expect this to do the same thing:

A blah(A a, size_t i)
{
   printf("i=%d\n", i);
   return a;
}

blah(blah(a, ++i), ++i);

but it does print:

i=1
i=2

So there is something definitely inconsistent here.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list