fix corner cases in ie8 & side_effects (#4731)

fixes #4729
fixes #4730
This commit is contained in:
Alex Lam S.L
2021-03-03 19:30:07 +00:00
committed by GitHub
parent 2a49760032
commit 20be5209c0
3 changed files with 67 additions and 6 deletions

View File

@@ -2919,3 +2919,28 @@ issue_4568: {
}
expect_stdout: "undefined 1"
}
issue_4729: {
options = {
ie8: true,
toplevel: true,
unused: true,
}
input: {
try {
f;
} catch(e) {
var a = a && a[function f() {}];
console.log("PASS");
}
}
expect: {
try {
f;
} catch(e) {
(function f() {});
console.log("PASS");
}
}
expect_stdout: "PASS"
}