From ae77ebe5a5f1be4b2634036f48d8b570b569cb21 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sun, 19 May 2019 12:59:40 +0800 Subject: fix corner case in `arguments` (#3421) fixes #3420 --- test/compress/keep_fargs.js | 66 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'test/compress/keep_fargs.js') diff --git a/test/compress/keep_fargs.js b/test/compress/keep_fargs.js index b23e96f0..558b10bb 100644 --- a/test/compress/keep_fargs.js +++ b/test/compress/keep_fargs.js @@ -1051,3 +1051,69 @@ function_name_mangle_ie8: { expect_exact: "(function(){console.log(typeof function o(){})})();" expect_stdout: "function" } + +issue_3420_1: { + options = { + keep_fargs: "strict", + unused: true, + } + input: { + console.log(function() { + return function(a, b, c, d) { + return a + b; + }; + }().length); + } + expect: { + console.log(function() { + return function(a, b, c, d) { + return a + b; + }; + }().length); + } + expect_stdout: "4" +} + +issue_3420_2: { + options = { + inline: true, + keep_fargs: "strict", + unused: true, + } + input: { + console.log(function() { + return function(a, b, c, d) { + return a + b; + }; + }().length); + } + expect: { + console.log(function(a, b, c, d) { + return a + b; + }.length); + } + expect_stdout: "4" +} + +issue_3420_3: { + options = { + inline: true, + keep_fargs: "strict", + reduce_vars: true, + unused: true, + } + input: { + console.log(function() { + function f(a, b, c, d) { + return a + b; + } + return f; + }().length); + } + expect: { + console.log(function(a, b, c, d) { + return a + b; + }.length); + } + expect_stdout: "4" +} -- cgit v1.2.3 h'>path: root/etc/substitutes
AgeCommit message (Expand)Author
2020-07-10maint: Remove traces of "berlin.guixsd.org"....Ludovic Courtès
2019-06-29etc: Remove hydra.gnu.org.pub key....Tobias Geerinckx-Rice
2019-05-01build: Change default substitute server to "ci.guix.gnu.org"....Ludovic Courtès