fix corner case in reduce_vars & unused (#4414)

fixes #4413
This commit is contained in:
Alex Lam S.L
2020-12-19 12:47:46 +08:00
committed by GitHub
parent e6dd471f8f
commit 9a5aede941
2 changed files with 20 additions and 0 deletions

View File

@@ -3134,3 +3134,22 @@ issue_4404: {
}
expect_stdout: "PASS"
}
issue_4413: {
options = {
reduce_vars: true,
unused: true,
}
input: {
console.log(function f(arguments) {
var arguments = function() {};
return arguments.length;
}());
}
expect: {
console.log(function(arguments) {
return function() {}.length;
}());
}
expect_stdout: "0"
}