fix corner case in pure_getters (#4441)

fixes #4440
This commit is contained in:
Alex Lam S.L
2020-12-23 20:09:09 +00:00
committed by GitHub
parent 7e575e9d7f
commit 56fce2131c
2 changed files with 31 additions and 1 deletions

View File

@@ -1208,3 +1208,32 @@ issue_3427: {
expect: {}
expect_stdout: true
}
issue_4440: {
options = {
pure_getters: "strict",
side_effects: true,
unused: true,
}
input: {
try {
(function() {
arguments = null;
console.log(arguments.p = "FAIL");
})();
} catch (e) {
console.log("PASS");
}
}
expect: {
try {
(function() {
arguments = null;
console.log(arguments.p = "FAIL");
})();
} catch (e) {
console.log("PASS");
}
}
expect_stdout: "PASS"
}