diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-03-06 18:27:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-06 18:27:42 +0000 |
commit | 421bb7083a9300b09e1da191a1e574b2be3a339e (patch) | |
tree | 312d3ef7f2a1341f511d12524cb6dca931bbdea3 /test | |
parent | bdc8ef221802a4da600ff1cdca34e9cc5c5fafc2 (diff) | |
download | tracifyjs-421bb7083a9300b09e1da191a1e574b2be3a339e.tar.gz tracifyjs-421bb7083a9300b09e1da191a1e574b2be3a339e.zip |
fix corner case in `unused` (#3747)
fixes #3746
Diffstat (limited to 'test')
-rw-r--r-- | test/compress/drop-unused.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js index 2d2f3d43..99ab7b40 100644 --- a/test/compress/drop-unused.js +++ b/test/compress/drop-unused.js @@ -2413,3 +2413,34 @@ issue_3673: { } expect_stdout: "PASS" } + +issue_3746: { + options = { + keep_fargs: "strict", + side_effects: true, + unused: true, + } + input: { + try { + A; + } catch (e) { + var e; + } + (function f(a) { + e = a; + })(); + console.log("PASS"); + } + expect: { + try { + A; + } catch (e) { + var e; + } + (function(a) { + e = a; + })(); + console.log("PASS"); + } + expect_stdout: "PASS" +} |