diff options
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/drop-unused.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/compress/drop-unused.js b/test/compress/drop-unused.js index 8c912a57..b66320ad 100644 --- a/test/compress/drop-unused.js +++ b/test/compress/drop-unused.js @@ -2755,3 +2755,37 @@ issue_3962_2: { } expect_stdout: "PASS" } + +issue_3986: { + options = { + reduce_vars: true, + side_effects: true, + toplevel: true, + unused: true, + } + input: { + var a = 0, b = 0; + (function() { + try { + throw 42; + } catch (e) { + a++; + } + b = b && 0; + })(b *= a); + console.log(b); + } + expect: { + var a = 0, b = 0; + (function() { + try { + throw 42; + } catch (e) { + a++; + } + b = b && 0; + })(b *= a); + console.log(b); + } + expect_stdout: "0" +} |