fix corner case in arguments (#4396)

fixes #4395
This commit is contained in:
Alex Lam S.L
2020-12-18 00:41:13 +00:00
committed by GitHub
parent 2c637fea8a
commit c1256c399a
3 changed files with 30 additions and 1 deletions

View File

@@ -1886,3 +1886,23 @@ issue_4386: {
expect_stdout: "PASS"
node_version: ">=6"
}
issue_4395: {
options = {
arguments: true,
}
input: {
console.log(function(a, {}) {
a = "FAIL";
return arguments[0];
}("PASS", 42));
}
expect: {
console.log(function(a, {}) {
a = "FAIL";
return arguments[0];
}("PASS", 42));
}
expect_stdout: "PASS"
node_version: ">=6"
}