fix corner case in unused (#4338)

fixes #4337
This commit is contained in:
Alex Lam S.L
2020-12-07 05:23:53 +00:00
committed by GitHub
parent 499f8d89ff
commit 6b603e1a62
2 changed files with 24 additions and 0 deletions

View File

@@ -264,3 +264,26 @@ issue_4335_2: {
expect_stdout: "PASS"
node_version: ">=8"
}
issue_4337: {
options = {
reduce_vars: true,
unused: true,
}
input: {
(function(a) {
a();
})(async function() {
console.log("PASS");
});
}
expect: {
(function(a) {
(async function() {
console.log("PASS");
})();
})();
}
expect_stdout: "PASS"
node_version: ">=8"
}