fix corner case in ie8 (#3543)

fixes #3542
This commit is contained in:
Alex Lam S.L
2019-10-28 23:54:27 +08:00
committed by GitHub
parent f38e31bd1e
commit 83fb8b4ca1
2 changed files with 23 additions and 1 deletions

View File

@@ -2339,3 +2339,25 @@ issue_3523_rename_ie8_toplevel: {
}
expect_stdout: "PASS"
}
issue_3542: {
options = {
ie8: true,
reduce_vars: true,
toplevel: true,
unused: true,
}
input: {
var a = 0;
var b = a++;
var c = b && function a() {} || b;
console.log(a);
}
expect: {
var a = 0;
a++;
(function a() {});
console.log(a);
}
expect_stdout: "1"
}