fix corner case in properties (#4330)

fixes #4329
This commit is contained in:
Alex Lam S.L
2020-12-06 05:59:04 +00:00
committed by GitHub
parent 1e4985ed9e
commit 37f4f56752
2 changed files with 45 additions and 2 deletions

View File

@@ -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"
}