aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-10-30 03:06:31 +0000
committerGitHub <noreply@github.com>2020-10-30 11:06:31 +0800
commit2e0ad40fe6635f7754a3e4dcdfb3b5bff75f4ae5 (patch)
treefa938d02895cce7bab4b50d302e61ba195ba9574 /test
parent5d12abc41b9cb4890b937599fa588a53fdb2996b (diff)
downloadtracifyjs-2e0ad40fe6635f7754a3e4dcdfb3b5bff75f4ae5.tar.gz
tracifyjs-2e0ad40fe6635f7754a3e4dcdfb3b5bff75f4ae5.zip
fix corner case in `ie8` (#4251)
fixes #4250
Diffstat (limited to 'test')
-rw-r--r--test/compress/ie8.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/compress/ie8.js b/test/compress/ie8.js
index 2a7dace3..c5b8b155 100644
--- a/test/compress/ie8.js
+++ b/test/compress/ie8.js
@@ -2877,3 +2877,30 @@ issue_4235: {
}
expect_stdout: "undefined"
}
+
+issue_4250: {
+ options = {
+ ie8: true,
+ loops: true,
+ unused: true,
+ }
+ input: {
+ console.log(function f() {
+ (function() {
+ for (f in "f");
+ })();
+ return f;
+ var f;
+ }());
+ }
+ expect: {
+ console.log(function f() {
+ (function() {
+ for (f in "f");
+ })();
+ return f;
+ var f;
+ }());
+ }
+ expect_stdout: "0"
+}