From fd6544b34011a30bd869d2447b744fe51d0d741f Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Wed, 18 Nov 2020 17:11:28 +0000 Subject: fix corner case `reduce_vars` (#4300) fixes #4297 --- test/compress/destructured.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test/compress') diff --git a/test/compress/destructured.js b/test/compress/destructured.js index cebb70ae..8671d87b 100644 --- a/test/compress/destructured.js +++ b/test/compress/destructured.js @@ -1503,6 +1503,25 @@ issue_4294: { node_version: ">=6" } +issue_4297: { + options = { + reduce_vars: true, + unused: true, + } + input: { + console.log(typeof function(a) { + return { a } = a; + }(function() {})); + } + expect: { + console.log(typeof function(a) { + return { a } = a; + }(function() {})); + } + expect_stdout: "function" + node_version: ">=6" +} + issue_4298: { options = { merge_vars: true, -- cgit v1.2.3