diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/merge_vars.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/compress/merge_vars.js b/test/compress/merge_vars.js index 02d17d31..c45f8353 100644 --- a/test/compress/merge_vars.js +++ b/test/compress/merge_vars.js @@ -3212,3 +3212,30 @@ issue_4628: { } expect_stdout: "undefined" } + +issue_4653: { + options = { + evaluate: true, + merge_vars: true, + reduce_vars: true, + toplevel: true, + unused: true, + } + input: { + var a = 1, b; + function f(c, d) { + c || console.log(d); + } + f(a++ + (b = b), b |= console.log(a)); + } + expect: { + var b = 1; + (function(c, d) { + c || console.log(d); + })(+b + (b = void 0), b |= console.log(2)); + } + expect_stdout: [ + "2", + "0", + ] +} |