fix corner case in ie8 & reduce_vars (#4029)

fixes #4028
This commit is contained in:
Alex Lam S.L
2020-07-28 20:11:02 +01:00
committed by GitHub
parent 6d3dcaa59e
commit dfe47bcc42
2 changed files with 32 additions and 1 deletions

View File

@@ -2661,3 +2661,33 @@ issue_4019: {
}
expect_stdout: "0"
}
issue_4028: {
options = {
reduce_vars: true,
toplevel: true,
unused: true,
}
mangle = {
ie8: true,
}
input: {
function a() {
try {
A;
} catch (e) {}
}
var b = a += a;
console.log(typeof b);
}
expect: {
function a() {
try {
A;
} catch (a) {}
}
var b = a += a;
console.log(typeof b);
}
expect_stdout: "string"
}