diff options
Diffstat (limited to 'test/compress/functions.js')
-rw-r--r-- | test/compress/functions.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/compress/functions.js b/test/compress/functions.js index ceaf0643..471ebf7f 100644 --- a/test/compress/functions.js +++ b/test/compress/functions.js @@ -2237,3 +2237,33 @@ issue_3018: { } expect_stdout: "PASS" } + +issue_3054: { + options = { + booleans: true, + collapse_vars: true, + inline: 1, + reduce_vars: true, + toplevel: true, + } + input: { + "use strict"; + function f() { + return { a: true }; + } + console.log(function(b) { + b = false; + return f(); + }().a, f.call().a); + } + expect: { + "use strict"; + function f() { + return { a: !0 }; + } + console.log(function(b) { + return { a: !(b = !1) }; + }().a, f.call().a); + } + expect_stdout: "true true" +} |