aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-08-26 12:45:38 +0100
committerGitHub <noreply@github.com>2020-08-26 19:45:38 +0800
commit3aa765e4296c4caf2f3b2b3e6b43b65caf05a28f (patch)
treefb8d8fc414de709ed60767fc9365e8f213ae40fe /test/compress
parent93d084a1d191379a55498a12f79f573e7bb1d1be (diff)
downloadtracifyjs-3aa765e4296c4caf2f3b2b3e6b43b65caf05a28f.tar.gz
tracifyjs-3aa765e4296c4caf2f3b2b3e6b43b65caf05a28f.zip
fix corner case in `evaluate` (#4078)
fixes #4077
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/evaluate.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js
index 9f97ba99..6d4d084d 100644
--- a/test/compress/evaluate.js
+++ b/test/compress/evaluate.js
@@ -2894,3 +2894,17 @@ issue_4067: {
}
expect_stdout: "NaN"
}
+
+issue_4077: {
+ options = {
+ evaluate: true,
+ unsafe: true,
+ }
+ input: {
+ console.log((a = []) - (a[0]++, 1) || "PASS");
+ }
+ expect: {
+ console.log((a = []) - (a[0]++, 1) || "PASS");
+ }
+ expect_stdout: "PASS"
+}