fix corner case in mangle (#4961)

fixes #4960
This commit is contained in:
Alex Lam S.L
2021-05-24 04:46:58 +01:00
committed by GitHub
parent df47632ecc
commit 1e787c556b
2 changed files with 32 additions and 3 deletions

View File

@@ -1588,3 +1588,33 @@ issue_4954_2: {
expect_stdout: "PASS"
node_version: ">=4"
}
issue_4960: {
mangle = {}
input: {
"use strict";
var a;
(function() {
{
const a = console.log("PASS");
}
try {} catch (e) {
const a = console.log("FAIL");
}
})();
}
expect: {
"use strict";
var a;
(function() {
{
const o = console.log("PASS");
}
try {} catch (c) {
const o = console.log("FAIL");
}
})();
}
expect_stdout: "PASS"
node_version: ">=4"
}