fix corner case in collapse_vars (#3672)

fixes #3671
This commit is contained in:
Alex Lam S.L
2020-01-07 19:34:16 +08:00
committed by GitHub
parent d17191111a
commit 4d6771b9b1
2 changed files with 28 additions and 1 deletions

View File

@@ -7464,3 +7464,30 @@ issue_3651: {
}
expect_stdout: "PASS"
}
issue_3671: {
options = {
collapse_vars: true,
}
input: {
var a = 0;
try {
a++;
A += 0;
a = 1 + a;
} catch (e) {
console.log(a);
}
}
expect: {
var a = 0;
try {
a++;
A += 0;
a = 1 + a;
} catch (e) {
console.log(a);
}
}
expect_stdout: "1"
}