diff options
Diffstat (limited to 'test/compress')
-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 4c3a6eda..dea01b60 100644 --- a/test/compress/collapse_vars.js +++ b/test/compress/collapse_vars.js @@ -8556,3 +8556,24 @@ issue_4070: { } expect_stdout: "NaN" } + +issue_4242: { + options = { + collapse_vars: true, + conditionals: true, + reduce_vars: true, + unused: true, + } + input: { + console.log(function() { + if (console) + var a = function(){}, b = (!1 === console || a)(); + }()); + } + expect: { + console.log(function() { + console && (!1 === console || function(){})(); + }()); + } + expect_stdout: "undefined" +} |