mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Rest assignment element allows nested destructuring (fixes #2156)
This commit is contained in:
@@ -7634,7 +7634,7 @@ module ts {
|
||||
}
|
||||
else {
|
||||
if (i === elements.length - 1) {
|
||||
checkReferenceAssignment((<SpreadElementExpression>e).expression, createArrayType(elementType), contextualMapper);
|
||||
checkDestructuringAssignment((<SpreadElementExpression>e).expression, createArrayType(elementType), contextualMapper);
|
||||
}
|
||||
else {
|
||||
error(e, Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern);
|
||||
|
||||
Reference in New Issue
Block a user