aboutsummaryrefslogtreecommitdiff
path: root/test/compress/collapse_vars.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress/collapse_vars.js')
-rw-r--r--test/compress/collapse_vars.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js
index 2381333a..951d72d6 100644
--- a/test/compress/collapse_vars.js
+++ b/test/compress/collapse_vars.js
@@ -6237,3 +6237,24 @@ issue_3439_2: {
}
expect_stdout: "number"
}
+
+cond_sequence_return: {
+ options = {
+ collapse_vars: true,
+ }
+ input: {
+ console.log(function(n) {
+ var c = 0;
+ for (var k in [0, 1])
+ if (c++, k == n) return c;
+ }(1));
+ }
+ expect: {
+ console.log(function(n) {
+ var c = 0;
+ for (var k in [0, 1])
+ if (c++, k == n) return c;
+ }(1));
+ }
+ expect_stdout: "2"
+}