fix corner case in reduce_vars (#3975)

fixes #3974
This commit is contained in:
Alex Lam S.L
2020-06-09 03:33:47 +01:00
committed by GitHub
parent 08c4729eb4
commit d764b6cc3b
2 changed files with 28 additions and 1 deletions

View File

@@ -7358,3 +7358,28 @@ issue_3958: {
"0",
]
}
issue_3974: {
options = {
reduce_vars: true,
toplevel: true,
unused: true,
}
input: {
try {
var a = 0 in 0;
0 && a;
} catch (e) {
console.log("PASS");
}
}
expect: {
try {
var a = 0 in 0;
0 && a;
} catch (e) {
console.log("PASS");
}
}
expect_stdout: "PASS"
}