diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/collapse_vars.js | 21 |
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" +} |