fix corner case in collapse_vars (#4869)

fixes #4868
This commit is contained in:
Alex Lam S.L
2021-04-24 22:16:51 +01:00
committed by GitHub
parent a2b1b96752
commit a1a212f639
2 changed files with 27 additions and 2 deletions

View File

@@ -9010,3 +9010,23 @@ issue_4865: {
}
expect_stdout: true
}
issue_4868: {
options = {
collapse_vars: true,
unused: true,
}
input: {
var a;
(function(b) {
console.log(b[0]);
})(a = [ "PASS" ], a = [ "FAIL" ]);
}
expect: {
var a;
(function(b) {
console.log(b[0]);
})(a = [ "PASS" ], a = [ "FAIL" ]);
}
expect_stdout: "PASS"
}