fix spread properties in assignment position - fixes #1315
This commit is contained in:
parent
80a4b95da4
commit
829f642ad8
@ -21,6 +21,7 @@ pp.toAssignable = function(node, isBinding) {
|
||||
node.type = "ObjectPattern"
|
||||
for (let i = 0; i < node.properties.length; i++) {
|
||||
let prop = node.properties[i]
|
||||
if (prop.type === "SpreadProperty") continue;
|
||||
if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter")
|
||||
this.toAssignable(prop.value, isBinding)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user