aboutsummaryrefslogtreecommitdiff
path: root/test/compress
diff options
context:
space:
mode:
Diffstat (limited to 'test/compress')
-rw-r--r--test/compress/dead-code.js39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/compress/dead-code.js b/test/compress/dead-code.js
index 2d2f9d92..591dd3a9 100644
--- a/test/compress/dead-code.js
+++ b/test/compress/dead-code.js
@@ -789,3 +789,42 @@ throw_assignment: {
"caught -9",
]
}
+
+issue_2597: {
+ options = {
+ dead_code: true,
+ }
+ input: {
+ function f(b) {
+ try {
+ try {
+ throw "foo";
+ } catch (e) {
+ return b = true;
+ }
+ } finally {
+ b && (a = "PASS");
+ }
+ }
+ var a = "FAIL";
+ f();
+ console.log(a);
+ }
+ expect: {
+ function f(b) {
+ try {
+ try {
+ throw "foo";
+ } catch (e) {
+ return b = true;
+ }
+ } finally {
+ b && (a = "PASS");
+ }
+ }
+ var a = "FAIL";
+ f();
+ console.log(a);
+ }
+ expect_stdout: "PASS"
+}