diff options
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r-- | test/compress/functions.js | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index c1522e2e..4dc685be 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -4014,3 +4014,51 @@ issue_3772: { } expect_stdout: "PASS" } + +issue_3777_1: { + options = { + inline: true, + reduce_vars: true, + side_effects: true, + } + input: { + (function() { + ff && ff(NaN); + function ff(a) { + var a = console.log("PASS"); + } + })(); + } + expect: { + (function() { + ff && ff(NaN); + function ff(a) { + var a = console.log("PASS"); + } + })(); + } + expect_stdout: "PASS" +} + +issue_3777_2: { + options = { + inline: true, + pure_getters: "strict", + reduce_vars: true, + side_effects: true, + toplevel: true, + } + input: { + ff(ff.p); + function ff(a) { + var a = console.log("PASS"); + } + } + expect: { + ff(ff.p); + function ff(a) { + var a = console.log("PASS"); + } + } + expect_stdout: "PASS" +} |