diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-15 13:23:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-15 21:23:55 +0800 |
commit | 549de028b664d565b237ab2c4f79c5ae2f64b1ad (patch) | |
tree | 6a37a21eaa94d931bb72e64c409841f940b3c54a /test/compress | |
parent | f579f1aa47a0ba13955433b90b56bea241849f83 (diff) | |
download | tracifyjs-549de028b664d565b237ab2c4f79c5ae2f64b1ad.tar.gz tracifyjs-549de028b664d565b237ab2c4f79c5ae2f64b1ad.zip |
fix corner case in `objects` (#4381)
fixes #4380
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/objects.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/compress/objects.js b/test/compress/objects.js index 5e59726d..a02dd084 100644 --- a/test/compress/objects.js +++ b/test/compress/objects.js @@ -387,3 +387,29 @@ issue_4269_5: { expect_stdout: "PASS" node_version: ">=4" } + +issue_4380: { + options = { + evaluate: true, + objects: true, + } + input: { + console.log({ + get 0() { + return "FAIL 1"; + }, + 0: "FAIL 2", + [0]: "PASS", + }[0]); + } + expect: { + console.log({ + get 0() { + return "FAIL 1"; + }, + [0]: ("FAIL 2", "PASS"), + }[0]); + } + expect_stdout: "PASS" + node_version: ">=4" +} |