fix corner case in reduce_vars (#4433)

fixes #4432
This commit is contained in:
Alex Lam S.L
2020-12-21 06:03:18 +00:00
committed by GitHub
parent 47b63ed1a0
commit c319030373
2 changed files with 29 additions and 3 deletions

View File

@@ -942,3 +942,23 @@ issue_4410_3: {
}
expect_stdout: "PASS"
}
issue_4432: {
options = {
arguments: true,
reduce_vars: true,
}
input: {
console.log(function(a) {
for (a in { FAIL: 42 });
return arguments[0];
}() || "PASS");
}
expect: {
console.log(function(a) {
for (a in { FAIL: 42 });
return arguments[0];
}() || "PASS");
}
expect_stdout: "PASS"
}