fix corner case in arguments (#5007)

fixes #5006
This commit is contained in:
Alex Lam S.L
2021-06-15 05:53:22 +01:00
committed by GitHub
parent 498ac83541
commit ac1262dc97
2 changed files with 25 additions and 1 deletions

View File

@@ -1156,3 +1156,23 @@ issue_4882_3: {
]
node_version: ">=8"
}
issue_5006: {
options = {
arguments: true,
}
input: {
console.log(function(b, c) {
c = "FAIL 2";
return arguments[1];
}(...[], "FAIL 1") || "PASS");
}
expect: {
console.log(function(b, c) {
c = "FAIL 2";
return arguments[1];
}(...[], "FAIL 1") || "PASS");
}
expect_stdout: "PASS"
node_version: ">=6"
}