diff options
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/drop-unused.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js index af792bfa..08fc7b18 100644 --- a/test/compress/drop-unused.js +++ b/test/compress/drop-unused.js @@ -1108,3 +1108,47 @@ var_catch_toplevel: { }(); } } + +issue_2105: { + options = { + collapse_vars: true, + inline: true, + reduce_vars: true, + side_effects: true, + unused: true, + } + input: { + !function(factory) { + factory(); + }( function() { + return function(fn) { + fn()().prop(); + }( function() { + function bar() { + var quux = function() { + console.log("PASS"); + }, foo = function() { + console.log; + quux(); + }; + return { prop: foo }; + } + return bar; + } ); + }); + } + expect: { + !void function() { + var quux = function() { + console.log("PASS"); + }; + return { + prop: function() { + console.log; + quux(); + } + }; + }().prop(); + } + expect_stdout: "PASS" +} |