fix corner case in ie8 (#4929)

fixes #4928
This commit is contained in:
Alex Lam S.L
2021-05-13 02:26:57 +01:00
committed by GitHub
parent 60f3b55156
commit e04429350f
3 changed files with 96 additions and 12 deletions

View File

@@ -253,3 +253,25 @@ issue_4906: {
expect_stdout: "PASS"
node_version: ">=14"
}
issue_4928: {
options = {
ie8: true,
toplevel: true,
unused: true,
}
input: {
var a = a?.[function f() {
f(a);
}];
console.log(typeof f);
}
expect: {
var a = a?.[function f() {
f(a);
}];
console.log(typeof f);
}
expect_stdout: "undefined"
node_version: ">=14"
}