diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-12-22 01:08:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-22 01:08:56 +0000 |
commit | 519a00bd8adc72888ccf8d39161f835608a39ac3 (patch) | |
tree | 20215354e06ddf299fc87d50783c051943d96cf8 /test/compress | |
parent | 3ff0feddee0f293649d87be28d3cd0cf587dd195 (diff) | |
download | tracifyjs-519a00bd8adc72888ccf8d39161f835608a39ac3.tar.gz tracifyjs-519a00bd8adc72888ccf8d39161f835608a39ac3.zip |
fix corner case in `collapse_vars` (#3642)
fixes #3641
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/collapse_vars.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/compress/collapse_vars.js b/test/compress/collapse_vars.js index 16cbadf8..edb5d57f 100644 --- a/test/compress/collapse_vars.js +++ b/test/compress/collapse_vars.js @@ -7399,3 +7399,26 @@ issue_3628_2: { } expect_stdout: "foo bar" } + +issue_3641: { + options = { + collapse_vars: true, + } + input: { + var a, b; + try { + a = "foo"; + b = (a += (A.p = 0, "bar")) % 0; + } catch (e) {} + console.log(a, b); + } + expect: { + var a, b; + try { + a = "foo"; + b = (a += (A.p = 0, "bar")) % 0; + } catch (e) {} + console.log(a, b); + } + expect_stdout: "foo undefined" +} |