diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-11-18 01:32:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 09:32:53 +0800 |
commit | 7a51c17ff0005ca3725c8afefe2f4086f4316ee2 (patch) | |
tree | cb71282f83f81fbb84f52192c091f3911e820b96 /test/compress/destructured.js | |
parent | aff842f2f9311295877de7e22c3c6afa4f82214b (diff) | |
download | tracifyjs-7a51c17ff0005ca3725c8afefe2f4086f4316ee2.tar.gz tracifyjs-7a51c17ff0005ca3725c8afefe2f4086f4316ee2.zip |
fix corner case in `merge_vars` (#4295)
fixes #4294
Diffstat (limited to 'test/compress/destructured.js')
-rw-r--r-- | test/compress/destructured.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/compress/destructured.js b/test/compress/destructured.js index 7eaad226..4ef28864 100644 --- a/test/compress/destructured.js +++ b/test/compress/destructured.js @@ -1470,3 +1470,35 @@ issue_4288: { expect_stdout: "undefined" node_version: ">=6" } + +issue_4294: { + options = { + merge_vars: true, + } + input: { + A = "PASS"; + (function() { + var a = function({ + [a]: {}, + }) {}({ + [a]: 0, + }); + var b = A; + console.log(b); + })(); + } + expect: { + A = "PASS"; + (function() { + var a = function({ + [a]: {}, + }) {}({ + [a]: 0, + }); + var b = A; + console.log(b); + })(); + } + expect_stdout: "PASS" + node_version: ">=6" +} |