aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-03-06 18:27:42 +0000
committerGitHub <noreply@github.com>2020-03-06 18:27:42 +0000
commit421bb7083a9300b09e1da191a1e574b2be3a339e (patch)
tree312d3ef7f2a1341f511d12524cb6dca931bbdea3 /test
parentbdc8ef221802a4da600ff1cdca34e9cc5c5fafc2 (diff)
downloadtracifyjs-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.js31
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"
+}