fix corner case in evaluate (#3888)

fixes #3887
This commit is contained in:
Alex Lam S.L
2020-05-12 10:58:37 +01:00
committed by GitHub
parent ee7647dc67
commit eb7fa25270
2 changed files with 24 additions and 1 deletions

View File

@@ -2395,3 +2395,26 @@ issue_3882: {
"NaN",
]
}
issue_3887: {
options = {
evaluate: true,
reduce_vars: true,
unused: true,
}
input: {
(function(b) {
try {
b-- && console.log("PASS");
} catch (a_2) {}
})(1);
}
expect: {
(function(b) {
try {
b-- && console.log("PASS");
} catch (a_2) {}
})(1);
}
expect_stdout: "PASS"
}