enhance collapse_vars (#2704)

This commit is contained in:
Alex Lam S.L
2018-01-02 18:42:15 +08:00
committed by GitHub
parent cc931b3ad8
commit 6dead95eb3
2 changed files with 16 additions and 7 deletions

View File

@@ -1285,7 +1285,7 @@ issue_2630_1: {
expect: {
var c = 0;
(function() {
while (c++, void (c = 1 + c));
while (void (c = 1 + ++c));
})(),
console.log(c);
}
@@ -1316,7 +1316,7 @@ issue_2630_2: {
expect: {
var c = 0;
!function() {
while (c += 1, void (c = 1 + c));
while (void (c = 1 + (c += 1)));
}(), console.log(c);
}
expect_stdout: "2"