diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-06 05:59:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-06 13:59:04 +0800 |
commit | 37f4f56752e0672ff8b76b1618266eae628088f7 (patch) | |
tree | 2f6dd45755f12c56456049d8ff6bf50d2be59942 /test/compress | |
parent | 1e4985ed9e0822118ad01313af09008af1e9f036 (diff) | |
download | tracifyjs-37f4f56752e0672ff8b76b1618266eae628088f7.tar.gz tracifyjs-37f4f56752e0672ff8b76b1618266eae628088f7.zip |
fix corner case in `properties` (#4330)
fixes #4329
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/spread.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/compress/spread.js b/test/compress/spread.js index b7a6f753..01818dc3 100644 --- a/test/compress/spread.js +++ b/test/compress/spread.js @@ -369,3 +369,33 @@ unused_var_side_effects: { expect_stdout: "PASS" node_version: ">=8" } + +issue_4329: { + options = { + properties: true, + } + input: { + console.log({ + ...{ + get 0() { + return "FAIL"; + }, + ...{ + 0: "PASS", + }, + }, + }[0]); + } + expect: { + console.log({ + ...{ + get 0() { + return "FAIL"; + }, + [0]: "PASS", + }, + }[0]); + } + expect_stdout: "PASS" + node_version: ">=8" +} |