RHS of AssignmentPattern can be a reference to a bound variable

This commit is contained in:
Braden Anderson 2015-09-14 17:25:23 +07:00
parent 436ba9b653
commit 9780858722

View File

@ -119,9 +119,9 @@ export function isReferenced(node: Object, parent: Object): boolean {
return parent.right === node;
// no: [NODE = foo] = [];
// no: [foo = NODE] = [];
// yes: [foo = NODE] = [];
case "AssignmentPattern":
return false;
return parent.right === node;
// no: [NODE] = [];
// no: ({ NODE }) = [];