fix corner case in unused (#4405)

fixes #4404
This commit is contained in:
Alex Lam S.L
2020-12-18 15:45:41 +00:00
committed by GitHub
parent 9c0718b162
commit 2415a72e75
2 changed files with 31 additions and 1 deletions

View File

@@ -3112,3 +3112,25 @@ issue_4235: {
}
expect_stdout: "undefined"
}
issue_4404: {
options = {
pure_getters: "strict",
unused: true,
}
input: {
function f(a) {
arguments[0] = "PASS";
console.log(a);
}
f("FAIL");
}
expect: {
function f(a) {
arguments[0] = "PASS";
console.log(a);
}
f("FAIL");
}
expect_stdout: "PASS"
}