diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/exponentiation.js | 4 | ||||
-rw-r--r-- | test/compress/spreads.js | 23 |
2 files changed, 25 insertions, 2 deletions
diff --git a/test/compress/exponentiation.js b/test/compress/exponentiation.js index 1a678f52..e945e13e 100644 --- a/test/compress/exponentiation.js +++ b/test/compress/exponentiation.js @@ -99,8 +99,8 @@ issue_4664: { expect: { (function f() { new function(a) { - console.log(typeof f, 2 ** 30, typeof this); - }(0, A = 0); + console.log(typeof f, 1073741824, typeof this); + }(A = 0); })(); } expect_stdout: "function 1073741824 object" diff --git a/test/compress/spreads.js b/test/compress/spreads.js index 02bb3f0e..4e5d0d98 100644 --- a/test/compress/spreads.js +++ b/test/compress/spreads.js @@ -1045,3 +1045,26 @@ issue_4614: { expect_stdout: true node_version: ">=6" } + +issue_4849: { + options = { + reduce_vars: true, + unused: true, + } + input: { + while (function() { + while (!console); + }(new function(a) { + console.log(typeof { ...a }); + }(function() {}))); + } + expect: { + while (function() { + while (!console); + }(function(a) { + console.log(typeof { ...function() {} }); + }())); + } + expect_stdout: "object" + node_version: ">=8" +} |