aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-01-09 20:20:43 +0000
committerGitHub <noreply@github.com>2021-01-10 04:20:43 +0800
commit0818d396c5cca408f161422800b79cf825ab5b9f (patch)
tree6254477faa909a73b1627109c965faa268e75e07 /test
parent770f3ba5fe6bba0768e881dd3fe46b2a21d4a5df (diff)
downloadtracifyjs-0818d396c5cca408f161422800b79cf825ab5b9f.tar.gz
tracifyjs-0818d396c5cca408f161422800b79cf825ab5b9f.zip
fix corner case in `mangle` (#4528)
fixes #4527
Diffstat (limited to 'test')
-rw-r--r--test/compress/const.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/compress/const.js b/test/compress/const.js
index 0281fd87..38cd8fbd 100644
--- a/test/compress/const.js
+++ b/test/compress/const.js
@@ -1399,3 +1399,38 @@ issue_4365_2: {
}
expect_stdout: true
}
+
+issue_4527: {
+ mangle = {}
+ input: {
+ (function() {
+ try {
+ throw 1;
+ } catch (a) {
+ try {
+ const a = FAIL;
+ } finally {
+ if (!b)
+ return console.log("aaaa");
+ }
+ }
+ var b;
+ })();
+ }
+ expect: {
+ (function() {
+ try {
+ throw 1;
+ } catch (a) {
+ try {
+ const a = FAIL;
+ } finally {
+ if (!t)
+ return console.log("aaaa");
+ }
+ }
+ var t;
+ })();
+ }
+ expect_stdout: "aaaa"
+}