fix corner case with arguments (#4697)

fixes #4696
This commit is contained in:
Alex Lam S.L
2021-02-27 01:26:15 +00:00
committed by GitHub
parent ba4a771bbc
commit 0a42457df6
3 changed files with 24 additions and 1 deletions

View File

@@ -977,3 +977,25 @@ issue_4432: {
}
expect_stdout: "PASS"
}
issue_4696: {
options = {
arguments: true,
keep_fargs: false,
}
input: {
console.log(function() {
for (arguments in [ 42 ]);
for (var a in arguments[0])
return "PASS";
}());
}
expect: {
console.log(function() {
for (arguments in [ 42 ]);
for (var a in arguments[0])
return "PASS";
}());
}
expect_stdout: "PASS"
}