aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-12-31 09:57:35 +0800
committerGitHub <noreply@github.com>2019-12-31 09:57:35 +0800
commit94785e8e14efaba6b2d8cbe61f183cf920cdb329 (patch)
treeb99157f63222e0a9c4fd77eed566e2539feb56cb /test
parent4dbdac9c312320770f8a24a3eda6e09aa429e3c0 (diff)
downloadtracifyjs-94785e8e14efaba6b2d8cbe61f183cf920cdb329.tar.gz
tracifyjs-94785e8e14efaba6b2d8cbe61f183cf920cdb329.zip
fix corner case in `booleans` (#3659)
fixes #3658
Diffstat (limited to 'test')
-rw-r--r--test/compress/booleans.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/compress/booleans.js b/test/compress/booleans.js
index a036a1d0..e1fa1a4f 100644
--- a/test/compress/booleans.js
+++ b/test/compress/booleans.js
@@ -110,3 +110,24 @@ issue_2737_2: {
}
expect_stdout: "PASS"
}
+
+issue_3658: {
+ options = {
+ booleans: true,
+ evaluate: true,
+ reduce_vars: true,
+ }
+ input: {
+ console.log(function f() {
+ console || f();
+ return "PASS";
+ }());
+ }
+ expect: {
+ console.log(function f() {
+ console || f();
+ return "PASS";
+ }());
+ }
+ expect_stdout: "PASS"
+}