diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-11-18 21:44:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 05:44:47 +0800 |
commit | aecbabc587247f65316988629d17aa29383f9156 (patch) | |
tree | 09ae36682cb966488728bb52dccc6ee30fe3cc9a /test | |
parent | fd6544b34011a30bd869d2447b744fe51d0d741f (diff) | |
download | tracifyjs-aecbabc587247f65316988629d17aa29383f9156.tar.gz tracifyjs-aecbabc587247f65316988629d17aa29383f9156.zip |
fix corner case in `merge_vars` (#4302)
fixes #4301
Diffstat (limited to 'test')
-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 8671d87b..bbe62a71 100644 --- a/test/compress/destructured.js +++ b/test/compress/destructured.js @@ -1559,3 +1559,35 @@ issue_4298: { expect_stdout: "PASS" node_version: ">=6" } + +issue_4301: { + options = { + merge_vars: true, + } + input: { + try { + console.log(function() { + var a, b = console; + return { + [a = b]: a.p, + } = "foo"; + }()); + } catch (e) { + console.log("bar"); + } + } + expect: { + try { + console.log(function() { + var a, b = console; + return { + [a = b]: a.p, + } = "foo"; + }()); + } catch (e) { + console.log("bar"); + } + } + expect_stdout: true + node_version: ">=6" +} |