aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-02-04 04:57:32 +0000
committerGitHub <noreply@github.com>2020-02-04 04:57:32 +0000
commitdf506439b16c550f7e8da30b392f17b0ca4c2e4a (patch)
tree041da3d90bdf5773063fba2bfa5ca79a7eee79ab /test
parent36b2d35bf35618042aeba57fc7ef37a39dadf295 (diff)
downloadtracifyjs-df506439b16c550f7e8da30b392f17b0ca4c2e4a.tar.gz
tracifyjs-df506439b16c550f7e8da30b392f17b0ca4c2e4a.zip
fix corner case in `sequences` (#3704)
fixes #3703
Diffstat (limited to 'test')
-rw-r--r--test/compress/sequences.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/compress/sequences.js b/test/compress/sequences.js
index 648f6491..c0b77127 100644
--- a/test/compress/sequences.js
+++ b/test/compress/sequences.js
@@ -1093,3 +1093,22 @@ issue_3490_2: {
}
expect_stdout: "PASS 42"
}
+
+issue_3703: {
+ options = {
+ evaluate: true,
+ sequences: true,
+ unsafe: true,
+ }
+ input: {
+ var a = "FAIL";
+ while ((a = "PASS", 0).foo = 0);
+ console.log(a);
+ }
+ expect: {
+ var a = "FAIL";
+ while (a = "PASS", (0).foo = 0);
+ console.log(a);
+ }
+ expect_stdout: "PASS"
+}