aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorkzc <zaxxon2011@gmail.com>2016-05-09 03:19:28 -0400
committerkzc <zaxxon2011@gmail.com>2016-05-09 03:19:28 -0400
commitbcc1318d4b7275feee02f782700d6b6e4a68b54f (patch)
treea79a1c2a80956dfea46377bceb010da8808add74 /test/compress
parenta0e03c9df47c411a40bceef02af2ce3dd1a329cc (diff)
downloadtracifyjs-bcc1318d4b7275feee02f782700d6b6e4a68b54f.tar.gz
tracifyjs-bcc1318d4b7275feee02f782700d6b6e4a68b54f.zip
Do not apply negate_iife optimization to `new` expression
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/negate-iife.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/compress/negate-iife.js b/test/compress/negate-iife.js
index 89c3f064..20b3f56e 100644
--- a/test/compress/negate-iife.js
+++ b/test/compress/negate-iife.js
@@ -74,3 +74,27 @@ negate_iife_4: {
}();
}
}
+
+negate_iife_issue_1073: {
+ options = {
+ negate_iife: true,
+ sequences: true,
+ conditionals: true,
+ };
+ input: {
+ new (function(a) {
+ return function Foo() {
+ this.x = a;
+ console.log(this);
+ };
+ }(7))();
+ }
+ expect: {
+ new (function(a) {
+ return function Foo() {
+ this.x = a,
+ console.log(this);
+ };
+ }(7))();
+ }
+}