diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-01-01 20:24:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-01 20:24:30 +0800 |
commit | 746f5f6c62c113ce89981f70ec5de8c8b78016da (patch) | |
tree | a8fc4e98b0d7a8673a845c348031a477c7e84c9c /test/compress | |
parent | d83d3d741ac8ea41a3776c9ca8d60e752180d420 (diff) | |
download | tracifyjs-746f5f6c62c113ce89981f70ec5de8c8b78016da.tar.gz tracifyjs-746f5f6c62c113ce89981f70ec5de8c8b78016da.zip |
fix corner case in `unused` (#3665)
fixes #3664
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/drop-unused.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js index 2e131f7d..b61af07a 100644 --- a/test/compress/drop-unused.js +++ b/test/compress/drop-unused.js @@ -2335,3 +2335,23 @@ function_parameter_ie8: { } expect_stdout: "PASS" } + +issue_3664: { + options = { + pure_getters: "strict", + unused: true, + } + input: { + console.log(function() { + var a, b = (a = (a = [ b && console.log("FAIL") ]).p = 0, 0); + return "PASS"; + }()); + } + expect: { + console.log(function() { + var b = ([ b && console.log("FAIL") ].p = 0, 0); + return "PASS"; + }()); + } + expect_stdout: "PASS" +} |