Status: New
Owner: ----

New issue 2926 by [email protected]: post-increment/decrement operator is too eager when incrementing function arguments
http://code.google.com/p/v8/issues/detail?id=2926

With version 3.14.5.9 (NodeJS 0.10.20), when passing a post-incremented argument to a function, it is incremented before execution of that function. The following code is enough to reproduce it on my system:


// Test post-increment
"use strict";

var i = 0;
var f = function (n) {
  console.log('f(): n = ' + n + '; i = ' + i);
};

f(i++);
f(i++);
f(i++);


producing output:


f(): n = 0; i = 1
f(): n = 1; i = 2
f(): n = 2; i = 3

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to