diff options
Diffstat (limited to 'test/compress/pure_getters.js')
-rw-r--r-- | test/compress/pure_getters.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/compress/pure_getters.js b/test/compress/pure_getters.js index 80b0e8ea..4e9ae4f4 100644 --- a/test/compress/pure_getters.js +++ b/test/compress/pure_getters.js @@ -694,3 +694,30 @@ issue_2678: { } expect_stdout: "PASS" } + +issue_2838: { + options = { + pure_getters: true, + side_effects: true, + } + input: { + function f(a, b) { + (a || b).c = "PASS"; + (function() { + return f(a, b); + }).prototype.foo = "bar"; + } + var o = {}; + f(null, o); + console.log(o.c); + } + expect: { + function f(a, b) { + (a || b).c = "PASS"; + } + var o = {}; + f(null, o); + console.log(o.c); + } + expect_stdout: "PASS" +} |