fix corner case in arguments (#4293)

fixes #4291
This commit is contained in:
Alex Lam S.L
2020-11-18 00:54:58 +00:00
committed by GitHub
parent 0bedd031da
commit aff842f2f9
3 changed files with 27 additions and 2 deletions

View File

@@ -807,3 +807,23 @@ issue_4200: {
}
expect_stdout: "undefined"
}
issue_4291: {
options = {
arguments: true,
keep_fargs: "strict",
}
input: {
console.log(function() {
arguments[0] = "PASS";
return arguments;
}()[0]);
}
expect: {
console.log(function() {
arguments[0] = "PASS";
return arguments;
}()[0]);
}
expect_stdout: "PASS"
}