diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-01-05 06:23:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 14:23:46 +0800 |
commit | fc5aee662d99257f59830ebcd5053ead48c9039b (patch) | |
tree | e8a6ad88390fec0e48916b10a5044ad56d2f54b7 /test/compress/destructured.js | |
parent | 5fbbb43839d010ec609da3bf15308cb5b6f74dc5 (diff) | |
download | tracifyjs-fc5aee662d99257f59830ebcd5053ead48c9039b.tar.gz tracifyjs-fc5aee662d99257f59830ebcd5053ead48c9039b.zip |
fix corner case in `merge_vars` (#4505)
fixes #4504
Diffstat (limited to 'test/compress/destructured.js')
-rw-r--r-- | test/compress/destructured.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compress/destructured.js b/test/compress/destructured.js index 70c4392a..9812b146 100644 --- a/test/compress/destructured.js +++ b/test/compress/destructured.js @@ -2326,3 +2326,29 @@ issue_4500: { expect_stdout: "PASS" node_version: ">=6" } + +issue_4504: { + options = { + inline: true, + merge_vars: true, + } + input: { + A = "FAIL"; + (function f(a) { + ({ + [console.log(a)]: 0[(b => console + b)(A)] + } = 0); + })("PASS"); + } + expect: { + A = "FAIL"; + (function f(a) { + ({ + [console.log(a)]: 0[b = A, console + b] + } = 0); + var b; + })("PASS"); + } + expect_stdout: "PASS" + node_version: ">=6" +} |