fix corner case in pure_getters (#4940)

fixes #4939
This commit is contained in:
Alex Lam S.L
2021-05-15 19:12:58 +01:00
committed by GitHub
parent a7698f8845
commit e13615549e
2 changed files with 28 additions and 1 deletions

View File

@@ -1638,3 +1638,29 @@ nested_property_assignments_3: {
}
expect_stdout: "PASS"
}
issue_4939: {
options = {
pure_getters: "strict",
side_effects: true,
}
input: {
({
__proto__: {
get p() {
console.log("PASS");
},
},
}).p;
}
expect: {
({
__proto__: {
get p() {
console.log("PASS");
},
},
}).p;
}
expect_stdout: "PASS"
}