fix corner case in collapse_vars (#5278)

fixes #5277
This commit is contained in:
Alex Lam S.L
2022-01-08 01:46:21 +00:00
committed by GitHub
parent b0df5d7b55
commit f473b4db38
2 changed files with 22 additions and 2 deletions

View File

@@ -9790,3 +9790,23 @@ issue_5276: {
}
expect_stdout: "PASS"
}
issue_5277: {
options = {
collapse_vars: true,
reduce_vars: true,
unused: true,
}
input: {
console.log(function() {
var a = function() {
a += null;
a -= 42;
};
}());
}
expect: {
console.log(function() {}());
}
expect_stdout: "undefined"
}