diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-07 05:23:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 13:23:53 +0800 |
commit | 6b603e1a62efe324af67ed6627b50565aed9599c (patch) | |
tree | 2290f09c91a4a5703fe716411a72265e86f3e7b6 /test/compress/async.js | |
parent | 499f8d89ffd03f6f7d5b7235f4345516176e044b (diff) | |
download | tracifyjs-6b603e1a62efe324af67ed6627b50565aed9599c.tar.gz tracifyjs-6b603e1a62efe324af67ed6627b50565aed9599c.zip |
fix corner case in `unused` (#4338)
fixes #4337
Diffstat (limited to 'test/compress/async.js')
-rw-r--r-- | test/compress/async.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/compress/async.js b/test/compress/async.js index 8da545bd..0f997332 100644 --- a/test/compress/async.js +++ b/test/compress/async.js @@ -264,3 +264,26 @@ issue_4335_2: { expect_stdout: "PASS" node_version: ">=8" } + +issue_4337: { + options = { + reduce_vars: true, + unused: true, + } + input: { + (function(a) { + a(); + })(async function() { + console.log("PASS"); + }); + } + expect: { + (function(a) { + (async function() { + console.log("PASS"); + })(); + })(); + } + expect_stdout: "PASS" + node_version: ">=8" +} |