aboutsummaryrefslogtreecommitdiff
path: root/test/compress/ie8.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-10-22 15:19:47 +0100
committerGitHub <noreply@github.com>2020-10-22 22:19:47 +0800
commit9e40abededaae3568e6cd931268cfaa0bd0ffbc0 (patch)
treedcbc391e63e65dcfd8a62a10f6130b058b222996 /test/compress/ie8.js
parent23ca7d675f5c7bbd80571ce40b8d951831d359ad (diff)
downloadtracifyjs-9e40abededaae3568e6cd931268cfaa0bd0ffbc0.tar.gz
tracifyjs-9e40abededaae3568e6cd931268cfaa0bd0ffbc0.zip
fix corner case in `unused` (#4236)
fixes #4235
Diffstat (limited to 'test/compress/ie8.js')
-rw-r--r--test/compress/ie8.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/compress/ie8.js b/test/compress/ie8.js
index f2132579..2a7dace3 100644
--- a/test/compress/ie8.js
+++ b/test/compress/ie8.js
@@ -2859,3 +2859,21 @@ issue_4186: {
}
expect_stdout: "NaN"
}
+
+issue_4235: {
+ options = {
+ ie8: true,
+ unused: true,
+ }
+ input: {
+ try {} catch (e) {}
+ console.log(function e() {
+ var e = 0;
+ }());
+ }
+ expect: {
+ try {} catch (e) {}
+ console.log(function e() {}());
+ }
+ expect_stdout: "undefined"
+}