aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-06-29 19:14:07 +0100
committerGitHub <noreply@github.com>2021-06-30 02:14:07 +0800
commit4ba8b66c5aa86e1c2a48be1fc0c4743f9510aabf (patch)
tree8ae3393d5a781207027641d4ae2aab370857512f /test
parent798121c9f3e41df9389af3e5e1d1e7f96dd528d3 (diff)
downloadtracifyjs-4ba8b66c5aa86e1c2a48be1fc0c4743f9510aabf.tar.gz
tracifyjs-4ba8b66c5aa86e1c2a48be1fc0c4743f9510aabf.zip
fix corner case in `ie8` (#5040)
fixes #5039
Diffstat (limited to 'test')
-rw-r--r--test/compress/optional-chains.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/compress/optional-chains.js b/test/compress/optional-chains.js
index ced841d2..be82b64e 100644
--- a/test/compress/optional-chains.js
+++ b/test/compress/optional-chains.js
@@ -305,3 +305,25 @@ issue_4947_2: {
expect_stdout: "PASS"
node_version: ">=14"
}
+
+issue_5039: {
+ options = {
+ ie8: true,
+ side_effects: true,
+ toplevel: true,
+ unused: true,
+ }
+ input: {
+ var a = a?.[function f() {
+ f;
+ a;
+ }];
+ console.log("PASS");
+ }
+ expect: {
+ (function f() {});
+ console.log("PASS");
+ }
+ expect_stdout: "PASS"
+ node_version: ">=14"
+}