fix corner case in collapse_vars (#4360)

fixes #4359
This commit is contained in:
Alex Lam S.L
2020-12-11 16:07:28 +00:00
committed by GitHub
parent 57105b299e
commit 515e93d88a
2 changed files with 35 additions and 4 deletions

View File

@@ -444,3 +444,30 @@ issue_4349_3: {
expect_stdout: "function"
node_version: ">=8"
}
issue_4359: {
options = {
collapse_vars: true,
unused: true,
}
input: {
try {
(async function(a) {
return a;
})(A);
} catch (e) {
console.log("PASS");
}
}
expect: {
try {
(async function(a) {
return a;
})(A);
} catch (e) {
console.log("PASS");
}
}
expect_stdout: "PASS"
node_version: ">=8"
}