diff options
Diffstat (limited to 'test/compress/properties.js')
-rw-r--r-- | test/compress/properties.js | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/test/compress/properties.js b/test/compress/properties.js index dbc7bf2d..419c7f85 100644 --- a/test/compress/properties.js +++ b/test/compress/properties.js @@ -1588,3 +1588,55 @@ issue_2816: { } expect_stdout: "3 2 4" } + +issue_2893_1: { + options = { + join_vars: true, + } + input: { + var o = { + get a() { + return "PASS"; + }, + }; + o.a = "FAIL"; + console.log(o.a); + } + expect: { + var o = { + get a() { + return "PASS"; + }, + }; + o.a = "FAIL"; + console.log(o.a); + } + expect_stdout: "PASS" +} + +issue_2893_2: { + options = { + join_vars: true, + } + input: { + var o = { + set a(v) { + this.b = v; + }, + b: "FAIL", + }; + o.a = "PASS"; + console.log(o.b); + } + expect: { + var o = { + set a(v) { + this.b = v; + }, + b: "FAIL", + }; + o.a = "PASS"; + console.log(o.b); + } + expect_stdout: "PASS" +} |