Skip to content

Commit 52df4da

Browse files
fokushi-dbmichaelficarra
authored andcommitted
fix issue estools#371
simply adopted solution described by johnjbarton in issue estools#371
1 parent 20a0d37 commit 52df4da

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

escodegen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@
967967
result = join(result, operator);
968968
result = [join(
969969
result,
970-
that.generateExpression(stmt.right, Precedence.Sequence, E_TTT)
970+
that.generateExpression(stmt.right, Precedence.Assignment, E_TTT)
971971
), ')'];
972972
});
973973
result.push(this.maybeBlock(stmt.body, flags));

test/compare-harmony/for-of-statement.expected.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ function test() {
33
}
44
for (let i of array) {
55
}
6+
for (let c of ('x', String('cat'))) {
7+
}
68
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
function test(){for(var i of array){}for(let i of array){}}
1+
function test(){for(var i of array){}for(let i of array){}for(let c of('x',String('cat'))){}}

test/compare-harmony/for-of-statement.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ function test() {
44

55
for (let i of array) {
66
}
7+
8+
for (let c of ('x', String('cat'))) {
9+
}
710
}

0 commit comments

Comments
 (0)