Rest assignment element allows nested destructuring (fixes #2156)

This commit is contained in:
Jason Freeman committed 2015-04-13 17:29:11 -07:00
1 parent e9f5acce75
commit f84ebba852
17 files changed
+135 -4

No files matched your search

+1 -1
View File
@@ -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);