diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-05-12 10:58:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 17:58:37 +0800 |
commit | eb7fa252703c052f81e2ab491d84ba352648e4c9 (patch) | |
tree | d47154755281e45200754f28fe8d711fb79173d3 /test/compress | |
parent | ee7647dc676b18355286609e9a4404dbcdcecc90 (diff) | |
download | tracifyjs-eb7fa252703c052f81e2ab491d84ba352648e4c9.tar.gz tracifyjs-eb7fa252703c052f81e2ab491d84ba352648e4c9.zip |
fix corner case in `evaluate` (#3888)
fixes #3887
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/evaluate.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js index 60f059a8..8425abe2 100644 --- a/test/compress/evaluate.js +++ b/test/compress/evaluate.js @@ -2395,3 +2395,26 @@ issue_3882: { "NaN", ] } + +issue_3887: { + options = { + evaluate: true, + reduce_vars: true, + unused: true, + } + input: { + (function(b) { + try { + b-- && console.log("PASS"); + } catch (a_2) {} + })(1); + } + expect: { + (function(b) { + try { + b-- && console.log("PASS"); + } catch (a_2) {} + })(1); + } + expect_stdout: "PASS" +} |