aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-02-24 20:41:21 +0000
committerGitHub <noreply@github.com>2021-02-25 04:41:21 +0800
commita5e6946f74333fc201e76bcba49d0b160edb4448 (patch)
tree0e32d460bb74f8ef6f0bd4d4d22263cdad5b8938 /test
parentb8672b55b25b3333188724a5c20588db96ccd0dc (diff)
downloadtracifyjs-a5e6946f74333fc201e76bcba49d0b160edb4448.tar.gz
tracifyjs-a5e6946f74333fc201e76bcba49d0b160edb4448.zip
fix corner case in `loops` (#4684)
fixes #4683
Diffstat (limited to 'test')
-rw-r--r--test/compress/classes.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/compress/classes.js b/test/compress/classes.js
index 78536094..95b4037d 100644
--- a/test/compress/classes.js
+++ b/test/compress/classes.js
@@ -596,3 +596,22 @@ issue_4681: {
expect_stdout: "function"
node_version: ">=12"
}
+
+issue_4683: {
+ options = {
+ dead_code: true,
+ evaluate: true,
+ loops: true,
+ }
+ input: {
+ "use strict";
+ for (class extends null {}; void console.log("PASS"); );
+ }
+ expect: {
+ "use strict";
+ (class extends null {});
+ void console.log("PASS");
+ }
+ expect_stdout: "PASS"
+ node_version: ">=4"
+}