From 34ead0430bf24323495f47751e726dcc6bd8d5e7 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Tue, 5 May 2020 22:02:35 +0100 Subject: enhance `dead_code` (#3849) --- test/compress/dead-code.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test') diff --git a/test/compress/dead-code.js b/test/compress/dead-code.js index 5a7be3c7..a1fb9483 100644 --- a/test/compress/dead-code.js +++ b/test/compress/dead-code.js @@ -1151,3 +1151,20 @@ issue_3830_6: { } expect_stdout: "PASS" } + +redundant_assignments: { + options = { + dead_code: true, + } + input: { + var a = a = "PASS", b = "FAIL"; + b = b = "PASS"; + console.log(a, b); + } + expect: { + var a = "PASS", b = "FAIL"; + b = "PASS"; + console.log(a, b); + } + expect_stdout: "PASS PASS" +} -- cgit v1.2.3