aboutsummaryrefslogtreecommitdiff
path: root/test/compress/ie8.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-10-06 02:20:41 +0100
committerGitHub <noreply@github.com>2020-10-06 09:20:41 +0800
commitbc6e105174eb67547c2bd988899e4c4f2d8f6ada (patch)
tree723a511070cf6cd526c9ec0e8bc51f36b430a616 /test/compress/ie8.js
parentb91a2459c0f270b770c5d105df75f78c16af4749 (diff)
downloadtracifyjs-bc6e105174eb67547c2bd988899e4c4f2d8f6ada.tar.gz
tracifyjs-bc6e105174eb67547c2bd988899e4c4f2d8f6ada.zip
fix corner case in `ie8` (#4187)
fixes #4186
Diffstat (limited to 'test/compress/ie8.js')
-rw-r--r--test/compress/ie8.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/compress/ie8.js b/test/compress/ie8.js
index 4d74d44e..f2132579 100644
--- a/test/compress/ie8.js
+++ b/test/compress/ie8.js
@@ -2819,3 +2819,43 @@ direct_inline_catch_redefined: {
}
expect_stdout: true
}
+
+issue_4186: {
+ options = {
+ dead_code: true,
+ evaluate: true,
+ ie8: true,
+ reduce_vars: true,
+ toplevel: true,
+ unused: true,
+ }
+ mangle = {
+ ie8: true,
+ toplevel: true,
+ }
+ input: {
+ function f() {
+ (function NaN() {
+ var a = 1;
+ while (a--)
+ try {} finally {
+ console.log(0/0);
+ var b;
+ }
+ })(f);
+ }
+ f();
+ NaN;
+ }
+ expect: {
+ (function() {
+ (function NaN() {
+ var n = 1;
+ while (n--)
+ console.log(0/0);
+ })();
+ })();
+ NaN;
+ }
+ expect_stdout: "NaN"
+}