fix corner case in reduce_vars (#3881)

fixes #3880
This commit is contained in:
Alex Lam S.L
2020-05-11 19:29:33 +01:00
committed by GitHub
parent 2b24dc25fb
commit e8a7956b6f
2 changed files with 27 additions and 2 deletions

View File

@@ -7047,3 +7047,24 @@ issue_3866: {
}
expect_stdout: "PASS"
}
issue_3880: {
options = {
reduce_funcs: true,
reduce_vars: true,
unused: true,
}
input: {
(function(a) {
while (a.var ^= 1);
console.log("PASS");
})(function() {});
}
expect: {
(function(a) {
while (a.var ^= 1);
console.log("PASS");
})(function() {});
}
expect_stdout: "PASS"
}