From e13615549ef15954fa7317a504652b82cbb93c1c Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sat, 15 May 2021 19:12:58 +0100 Subject: fix corner case in `pure_getters` (#4940) fixes #4939 --- test/compress/pure_getters.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'test') 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" +} -- cgit v1.2.3