From 998245ffd6fcd56129d99a3829aa845fe1faa0d2 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 8 May 2020 08:03:29 +0100 Subject: fix corner case in `inline` (#3859) fixes #3858 --- test/compress/pure_funcs.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'test/compress') diff --git a/test/compress/pure_funcs.js b/test/compress/pure_funcs.js index 48140dd6..2ca21d00 100644 --- a/test/compress/pure_funcs.js +++ b/test/compress/pure_funcs.js @@ -680,3 +680,29 @@ issue_3325_2: { } expect_stdout: "PASS" } + +issue_3858: { + options = { + collapse_vars: true, + inline: true, + keep_fargs: "strict", + unused: true, + } + input: { + var f = function(a) { + return /*@__PURE__*/ function(b) { + console.log(b); + }(a); + }; + f("PASS"); + } + expect: { + var f = function(a) { + return function() { + console.log(a); + }(); + }; + f("PASS"); + } + expect_stdout: "PASS" +} -- cgit v1.2.3