fix corner cases with arguments (#4481)

fixes #4480
This commit is contained in:
Alex Lam S.L
2020-12-29 16:22:03 +00:00
committed by GitHub
parent 560ccc1221
commit 1956edd503
5 changed files with 56 additions and 59 deletions

View File

@@ -3117,3 +3117,28 @@ issue_4422: {
}
expect_stdout: "PASS"
}
issue_4480: {
options = {
evaluate: true,
reduce_vars: true,
unused: true,
}
input: {
var a = function f(b) {
b = "FAIL";
arguments[0] = "PASS";
var arguments = 0;
console.log(b);
}(a);
}
expect: {
var a = function(b) {
b = "FAIL";
arguments[0] = "PASS";
var arguments = 0;
console.log(b);
}(a);
}
expect_stdout: "PASS"
}