diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-10-30 23:19:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-30 23:19:27 +0800 |
commit | a48f87abf2fb09cc8296444eb613021ef66492c3 (patch) | |
tree | 44baa58b8268f79548ed1e522b2019636176da0a /test/compress/properties.js | |
parent | 2fd927a7ccfb55de415bf1faafb45e5006ca9984 (diff) | |
download | tracifyjs-a48f87abf2fb09cc8296444eb613021ef66492c3.tar.gz tracifyjs-a48f87abf2fb09cc8296444eb613021ef66492c3.zip |
compress `new` `function` containing `this` (#2417)
Diffstat (limited to 'test/compress/properties.js')
-rw-r--r-- | test/compress/properties.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/compress/properties.js b/test/compress/properties.js index 1b5e7fc7..ab202525 100644 --- a/test/compress/properties.js +++ b/test/compress/properties.js @@ -1006,3 +1006,22 @@ array_hole: { } expect_stdout: "2 undefined 3" } + +new_this: { + options = { + properties: true, + side_effects: true, + } + input: { + new { + f: function(a) { + this.a = a; + } + }.f(42); + } + expect: { + new function(a) { + this.a = a; + }(42); + } +} |