From 766a4147d4891a093b550e958268c48104330b52 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Thu, 21 Jun 2018 14:10:37 +0800 Subject: enhance `arguments` (#3193) fixes #3192 --- test/compress/drop-unused.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/compress/drop-unused.js') diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js index 59990b58..e4daa4fc 100644 --- a/test/compress/drop-unused.js +++ b/test/compress/drop-unused.js @@ -1926,3 +1926,31 @@ issue_3146_4: { } expect_stdout: "PASS" } + +issue_3192: { + options = { + unused: true, + } + input: { + (function(a) { + console.log(a = "foo", arguments[0]); + })("bar"); + (function(a) { + "use strict"; + console.log(a = "foo", arguments[0]); + })("bar"); + } + expect: { + (function(a) { + console.log(a = "foo", arguments[0]); + })("bar"); + (function(a) { + "use strict"; + console.log("foo", arguments[0]); + })("bar"); + } + expect_stdout: [ + "foo foo", + "foo bar", + ] +} -- cgit v1.2.3