aboutsummaryrefslogtreecommitdiff
path: root/test/compress/transform.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-02-28 23:34:48 +0800
committerGitHub <noreply@github.com>2018-02-28 23:34:48 +0800
commit56e2a369d0b522c315a3b146bdf7581d8e71d9cc (patch)
treec2b1ef773365210f97fe41a235b1565f5fac48c0 /test/compress/transform.js
parent0daa199fa85e60b78b04b82a91acdb230cb42229 (diff)
downloadtracifyjs-56e2a369d0b522c315a3b146bdf7581d8e71d9cc.tar.gz
tracifyjs-56e2a369d0b522c315a3b146bdf7581d8e71d9cc.zip
enhance `conditionals` (#2966)
- `x ? (y, w) : (z, w)` => `x ? y : z, w`
Diffstat (limited to 'test/compress/transform.js')
-rw-r--r--test/compress/transform.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/compress/transform.js b/test/compress/transform.js
index 68d33844..58874cd6 100644
--- a/test/compress/transform.js
+++ b/test/compress/transform.js
@@ -104,6 +104,7 @@ if_return: {
conditionals: true,
if_return: true,
sequences: true,
+ side_effects: true,
}
input: {
function f(w, x, y, z) {
@@ -124,7 +125,7 @@ if_return: {
if (w) {
if (y) return;
} else if (z) return;
- return x == y || (x && w(), y && z(), !0);
+ return x == y || (x && w(), y && z()), !0;
}
}
}