From 1b646d3bc4bd69cbe12fb14def7716edde01a3c4 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 18 Dec 2020 02:12:01 +0000 Subject: fix corner case in `arguments` (#4400) fixes #4399 --- test/compress/destructured.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test/compress') diff --git a/test/compress/destructured.js b/test/compress/destructured.js index 1c448f2a..8e1cf68c 100644 --- a/test/compress/destructured.js +++ b/test/compress/destructured.js @@ -1906,3 +1906,25 @@ issue_4395: { expect_stdout: "PASS" node_version: ">=6" } + +issue_4399: { + options = { + arguments: true, + } + input: { + console.log(function({ + [arguments[1]]: a, + }, b) { + return a; + }([ "PASS" ], 0)); + } + expect: { + console.log(function({ + [arguments[1]]: a, + }, b) { + return a; + }([ "PASS" ], 0)); + } + expect_stdout: "PASS" + node_version: ">=6" +} -- cgit v1.2.3