aboutsummaryrefslogtreecommitdiff
path: root/test/compress/ie8.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-05-12 12:28:29 +0100
committerGitHub <noreply@github.com>2020-05-12 19:28:29 +0800
commit8024f7f7a86023cf68f1f1b2496ec38c8bc200d8 (patch)
tree62c1625d843d7694dbc175c067ce0ea756bcf116 /test/compress/ie8.js
parenteb7fa252703c052f81e2ab491d84ba352648e4c9 (diff)
downloadtracifyjs-8024f7f7a86023cf68f1f1b2496ec38c8bc200d8.tar.gz
tracifyjs-8024f7f7a86023cf68f1f1b2496ec38c8bc200d8.zip
fix corner case in `ie8` (#3890)
fixes #3889
Diffstat (limited to 'test/compress/ie8.js')
-rw-r--r--test/compress/ie8.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/compress/ie8.js b/test/compress/ie8.js
index 53f78f1b..68ccab17 100644
--- a/test/compress/ie8.js
+++ b/test/compress/ie8.js
@@ -2460,3 +2460,32 @@ issue_3825: {
}
expect_stdout: "undefined"
}
+
+issue_3889: {
+ options = {
+ evaluate: true,
+ ie8: true,
+ reduce_vars: true,
+ }
+ input: {
+ function f(a) {
+ a = 0;
+ (function a() {
+ var a;
+ console.log(a);
+ })();
+ }
+ f();
+ }
+ expect: {
+ function f(a) {
+ a = 0;
+ (function a() {
+ var a;
+ console.log(a);
+ })();
+ }
+ f();
+ }
+ expect_stdout: "undefined"
+}