fix corner case reduce_vars (#4300)

fixes #4297
This commit is contained in:
Alex Lam S.L
2020-11-18 17:11:28 +00:00
committed by GitHub
parent f6a83f7944
commit fd6544b340
2 changed files with 20 additions and 0 deletions

View File

@@ -1503,6 +1503,25 @@ issue_4294: {
node_version: ">=6"
}
issue_4297: {
options = {
reduce_vars: true,
unused: true,
}
input: {
console.log(typeof function(a) {
return { a } = a;
}(function() {}));
}
expect: {
console.log(typeof function(a) {
return { a } = a;
}(function() {}));
}
expect_stdout: "function"
node_version: ">=6"
}
issue_4298: {
options = {
merge_vars: true,