diff --git a/test/compress/functions.js b/test/compress/functions.js index 6262462e..222aa0ca 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -1906,7 +1906,7 @@ duplicate_arg_var: { expect_stdout: "PASS" } -issue_2737: { +issue_2737_1: { options = { inline: true, reduce_vars: true, @@ -1928,3 +1928,26 @@ issue_2737: { } expect_stdout: "function" } + +issue_2737_2: { + options = { + inline: true, + reduce_vars: true, + unused: true, + } + input: { + (function(bar) { + for (;bar(); ) break; + })(function qux() { + return console.log("PASS"), qux; + }); + } + expect: { + (function(bar) { + for (;bar(); ) break; + })(function qux() { + return console.log("PASS"), qux; + }); + } + expect_stdout: "PASS" +}