aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-10-12 05:43:26 +0100
committerGitHub <noreply@github.com>2020-10-12 12:43:26 +0800
commit9b7a13c8c7f06598b3da8da29da4e8e5680cd24e (patch)
treec64f777b0b7e72763d69ea8a14bb7331115c3197 /test
parent74ff6ce261548289c96f7d907a3605640e20e9d1 (diff)
downloadtracifyjs-9b7a13c8c7f06598b3da8da29da4e8e5680cd24e.tar.gz
tracifyjs-9b7a13c8c7f06598b3da8da29da4e8e5680cd24e.zip
fix corner case in `ie8` & `mangle` (#4196)
fixes #4195
Diffstat (limited to 'test')
-rw-r--r--test/compress/const.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/compress/const.js b/test/compress/const.js
index f09dc56f..6cd1124a 100644
--- a/test/compress/const.js
+++ b/test/compress/const.js
@@ -747,3 +747,32 @@ issue_4193: {
}
expect_stdout: true
}
+
+issue_4195: {
+ mangle = {
+ ie8: true,
+ }
+ input: {
+ console.log(function f(a) {
+ (function a() {
+ {
+ const b = f, a = 0;
+ b;
+ }
+ })();
+ a && f;
+ }());
+ }
+ expect: {
+ console.log(function f(o) {
+ (function o() {
+ {
+ const n = f, o = 0;
+ n;
+ }
+ })();
+ o && f;
+ }());
+ }
+ expect_stdout: "undefined"
+}