« Bugzilla Issues Index
#3213 — 13.2.2.5 Evaluation: RTL or LTR evaluation order for VariableDeclaration?
- bug_id:
3213
- creation_ts:
2014-09-07 11:13:00 -0700
- short_desc:
13.2.2.5 Evaluation: RTL or LTR evaluation order for VariableDeclaration?
- delta_ts:
2014-12-23 20:23:23 -0800
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 27: August 24, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- see_also:
https://bugs.ecmascript.org/show_bug.cgi?id=3463
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
10162
- comment_count:
0
- who:
André Bargull
- bug_when:
2014-09-07 11:13:50 -0700
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
- commentid:
10228
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2014-09-21 11:34:30 -0700
no, it's not intentional.
I'll have do to a little refactoring to fix it.
- commentid:
11132
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2014-12-22 15:09:55 -0800
fixed in rev30 editor's draft
- commentid:
11143
- comment_count:
3
- who:
Allen Wirfs-Brock
- bug_when:
2014-12-23 20:23:23 -0800
fixed in rev30