Status: Assigned
Owner: [email protected]
CC: [email protected], [email protected]
Labels: Type-Bug Priority-Medium HW-All OS-All Area-Language
New issue 4250 by [email protected]: eval with var is not working as expected
https://code.google.com/p/v8/issues/detail?id=4250
'language/expressions/assignment/S11.13.1_A5*': [FAIL],
'language/expressions/assignment/S11.13.1_A6*': [FAIL],
One example:
// sloppy mode
function testAssignment() {
var x = 0;
var innerX = (function() {
x = (eval("var x = 2;"), 1);
return x;
})();
if (innerX !== 2) {
$ERROR('#1: innerX === 2. Actual: ' + (innerX));
}
if (x !== 1) {
$ERROR('#2: x === 1. Actual: ' + (x));
}
}
testAssignment();
The problem is that we should evaluate the LHS x before the eval so that
should bind to the outer x.
--
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/d/optout.