fix corner case in arguments (#4398)

fixes #4397
This commit is contained in:
Alex Lam S.L
2020-12-18 01:42:07 +00:00
committed by GitHub
parent c1256c399a
commit 82d2aa4acf
3 changed files with 34 additions and 9 deletions

View File

@@ -851,3 +851,23 @@ issue_4291_2: {
}
expect_stdout: "PASS 42 1"
}
issue_4397: {
options = {
arguments: true,
keep_fargs: "strict",
}
input: {
console.log(typeof function() {
arguments += 0;
return arguments[0];
}());
}
expect: {
console.log(typeof function() {
arguments += 0;
return arguments[0];
}());
}
expect_stdout: "string"
}