aboutsummaryrefslogtreecommitdiff
path: root/test/compress/conditionals.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/conditionals.js')
-rw-r--r--test/compress/conditionals.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/compress/conditionals.js b/test/compress/conditionals.js
index 4d61d39f..7838fdbb 100644
--- a/test/compress/conditionals.js
+++ b/test/compress/conditionals.js
@@ -1203,3 +1203,24 @@ issue_2560: {
"2",
]
}
+
+hoist_decl: {
+ options = {
+ conditionals: true,
+ join_vars: true,
+ sequences: true,
+ }
+ input: {
+ if (x()) {
+ var a;
+ y();
+ } else {
+ z();
+ var b;
+ }
+ }
+ expect: {
+ var a, b;
+ x() ? y() : z();
+ }
+}