aboutsummaryrefslogtreecommitdiff
path: root/test/compress/loops.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-08-26 10:32:20 +0100
committerGitHub <noreply@github.com>2020-08-26 17:32:20 +0800
commit93d084a1d191379a55498a12f79f573e7bb1d1be (patch)
tree799f169714a73f3f1b4aae4d10efedd7642e5e57 /test/compress/loops.js
parentc7a3e09407fbed928ccd874609c63c31b27f052a (diff)
downloadtracifyjs-93d084a1d191379a55498a12f79f573e7bb1d1be.tar.gz
tracifyjs-93d084a1d191379a55498a12f79f573e7bb1d1be.zip
fix corner case in `loops` & `unused` (#4076)
fixes #4075
Diffstat (limited to 'test/compress/loops.js')
-rw-r--r--test/compress/loops.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/loops.js b/test/compress/loops.js
index 4a276b9e..23d46de1 100644
--- a/test/compress/loops.js
+++ b/test/compress/loops.js
@@ -963,3 +963,25 @@ issue_3634_2: {
}
expect_stdout: "1"
}
+
+issue_4075: {
+ options = {
+ loops: true,
+ unused: true,
+ }
+ input: {
+ var a = "FAIL";
+ (function() {
+ for (a in { PASS: 0 });
+ })()
+ console.log(a);
+ }
+ expect: {
+ var a = "FAIL";
+ (function() {
+ for (a in { PASS: 0 });
+ })()
+ console.log(a);
+ }
+ expect_stdout: "PASS"
+}