diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-24 02:56:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-24 10:56:22 +0800 |
commit | 5f269cd57356fc4dbe7486dca22902d22695d499 (patch) | |
tree | 1a7ac6838449a7b154d411547d75be784c361aa2 /test/compress/default-values.js | |
parent | 6988cd95584ce8b66716c17afad9d2dcc71717d0 (diff) | |
download | tracifyjs-5f269cd57356fc4dbe7486dca22902d22695d499.tar.gz tracifyjs-5f269cd57356fc4dbe7486dca22902d22695d499.zip |
fix corner case in `collapse_vars` (#4445)
fixes #4444
Diffstat (limited to 'test/compress/default-values.js')
-rw-r--r-- | test/compress/default-values.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/compress/default-values.js b/test/compress/default-values.js index 2e046444..64dad3cf 100644 --- a/test/compress/default-values.js +++ b/test/compress/default-values.js @@ -950,3 +950,27 @@ mangle_arrow_2_toplevel: { expect_stdout: "PASS" node_version: ">=6" } + +issue_4444: { + options = { + collapse_vars: true, + } + input: { + var a = "PASS"; + console.log(function(b) { + b = a; + (function(c = b.p) {})(); + return a; + }()); + } + expect: { + var a = "PASS"; + console.log(function(b) { + b = a; + (function(c = b.p) {})(); + return a; + }()); + } + expect_stdout: "PASS" + node_version: ">=6" +} |