From f5ceff6e4b94a032078b0730f91662ee62758eb4 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Tue, 7 Jan 2020 20:06:25 +0800 Subject: fix corner case in `unused` (#3674) fixes #3673 --- test/compress/drop-unused.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test') diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js index b61af07a..0691a180 100644 --- a/test/compress/drop-unused.js +++ b/test/compress/drop-unused.js @@ -2355,3 +2355,23 @@ issue_3664: { } expect_stdout: "PASS" } + +issue_3673: { + options = { + pure_getters: "strict", + side_effects: true, + toplevel: true, + unused: true, + } + input: { + var a; + (a = [ a ]).p = 42; + console.log("PASS"); + } + expect: { + var a; + (a = [ a ]).p = 42; + console.log("PASS"); + } + expect_stdout: "PASS" +} -- cgit v1.2.3