archives

« Bugzilla Issues Index

#3213 — 13.2.2.5 Evaluation: RTL or LTR evaluation order for VariableDeclaration?


13.2.2.5 Runtime Semantics: Evaluation
VariableDeclaration : BindingIdentifier Initializer

ES5 specifies a left-to-right evaluation order, rev3 for ES6 changed this to right-to-left. Was this change intentional?


Test case:
---
function testFunction() {
var scope = {x: 0};
with (scope) {
var x = (delete scope.x, 1);
}
print("scope.x: " + scope.x);
print("x: " + x);
}
testFunction();
---

ES5 expected results: scope.x = 1, x = undefined
ES6 expected results: scope.x = undefined, x = 1


no, it's not intentional.

I'll have do to a little refactoring to fix it.


fixed in rev30 editor's draft


fixed in rev30