aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-05-15 19:12:58 +0100
committerGitHub <noreply@github.com>2021-05-16 02:12:58 +0800
commite13615549ef15954fa7317a504652b82cbb93c1c (patch)
tree8cc12b4e8685ffe594a2fbb236c6dc972887ef63 /test
parenta7698f88455b3bfc40b6543c812e6a795f00cd99 (diff)
downloadtracifyjs-e13615549ef15954fa7317a504652b82cbb93c1c.tar.gz
tracifyjs-e13615549ef15954fa7317a504652b82cbb93c1c.zip
fix corner case in `pure_getters` (#4940)
fixes #4939
Diffstat (limited to 'test')
-rw-r--r--test/compress/pure_getters.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compress/pure_getters.js b/test/compress/pure_getters.js
index 2a20c339..935b3e31 100644
--- a/test/compress/pure_getters.js
+++ b/test/compress/pure_getters.js
@@ -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"
+}