diff options
Diffstat (limited to 'test/compress/dead-code.js')
-rw-r--r-- | test/compress/dead-code.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/compress/dead-code.js b/test/compress/dead-code.js index abc7384d..d4832c73 100644 --- a/test/compress/dead-code.js +++ b/test/compress/dead-code.js @@ -1102,3 +1102,30 @@ catch_return_assign: { } expect_stdout: "PASS" } + +issue_3578: { + options = { + dead_code: true, + } + input: { + var a = "FAIL", b, c; + try { + b = c.p = b = 0; + } catch (e) { + b += 42; + b && (a = "PASS"); + } + console.log(a); + } + expect: { + var a = "FAIL", b, c; + try { + b = c.p = b = 0; + } catch (e) { + b += 42; + b && (a = "PASS"); + } + console.log(a); + } + expect_stdout: "PASS" +} |