aboutsummaryrefslogtreecommitdiff
path: root/test/compress/functions.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-03-05 12:12:59 +0800
committerGitHub <noreply@github.com>2017-03-05 12:12:59 +0800
commit78d1bb92d4560b73099afddd3bd2a85641bf3002 (patch)
treea867b25913d92beb9d2eb4597dbd78d137c780ce /test/compress/functions.js
parentea9ab9fb0e48b4bf011da67f86652f148ae6ed1a (diff)
downloadtracifyjs-78d1bb92d4560b73099afddd3bd2a85641bf3002.tar.gz
tracifyjs-78d1bb92d4560b73099afddd3bd2a85641bf3002.zip
fix a corner case in #1530 (#1552)
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r--test/compress/functions.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js
index 18505a18..a1a515a1 100644
--- a/test/compress/functions.js
+++ b/test/compress/functions.js
@@ -74,3 +74,20 @@ iifes_returning_constants_keep_fargs_false: {
console.log((a(), b(), 6));
}
}
+
+issue_485_crashing_1530: {
+ options = {
+ conditionals: true,
+ dead_code: true,
+ evaluate: true,
+ }
+ input: {
+ (function(a) {
+ if (true) return;
+ var b = 42;
+ })(this);
+ }
+ expect: {
+ this, void 0;
+ }
+}