aboutsummaryrefslogtreecommitdiff
path: root/test/compress/ie8.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-10-28 23:54:27 +0800
committerGitHub <noreply@github.com>2019-10-28 23:54:27 +0800
commit83fb8b4ca1e877c9ca7b3b07712ddec1c6f3a43d (patch)
treeb995cb2c53a926b0850278a1856a3a3ef043c150 /test/compress/ie8.js
parentf38e31bd1ee117fc8adb0d13982b5ec16e761f52 (diff)
downloadtracifyjs-83fb8b4ca1e877c9ca7b3b07712ddec1c6f3a43d.tar.gz
tracifyjs-83fb8b4ca1e877c9ca7b3b07712ddec1c6f3a43d.zip
fix corner case in `ie8` (#3543)
fixes #3542
Diffstat (limited to 'test/compress/ie8.js')
-rw-r--r--test/compress/ie8.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/ie8.js b/test/compress/ie8.js
index 1a840262..f8ce35dc 100644
--- a/test/compress/ie8.js
+++ b/test/compress/ie8.js
@@ -2339,3 +2339,25 @@ issue_3523_rename_ie8_toplevel: {
}
expect_stdout: "PASS"
}
+
+issue_3542: {
+ options = {
+ ie8: true,
+ reduce_vars: true,
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ var a = 0;
+ var b = a++;
+ var c = b && function a() {} || b;
+ console.log(a);
+ }
+ expect: {
+ var a = 0;
+ a++;
+ (function a() {});
+ console.log(a);
+ }
+ expect_stdout: "1"
+}