@@ -1690,15 +1690,24 @@ $(H3 $(LNAME2 array_literals, Array Literals))
1690
1690
1691
1691
$(GRAMMAR
1692
1692
$(GNAME ArrayLiteral):
1693
- $(D [) $(GLINK ArgumentList)$(OPT) $(D ])
1693
+ $(D [) $(I ArrayMemberInitializations)$(OPT) $(D ])
1694
+
1695
+ $(GNAME ArrayMemberInitializations):
1696
+ $(I ArrayMemberInitialization)
1697
+ $(I ArrayMemberInitialization) $(D ,)
1698
+ $(I ArrayMemberInitialization) $(D ,) $(GSELF ArrayMemberInitializations)
1699
+
1700
+ $(GNAME ArrayMemberInitialization):
1701
+ $(GLINK2 declaration, NonVoidInitializer)
1702
+ $(GLINK AssignExpression) $(D :) $(GLINK2 declaration, NonVoidInitializer)
1694
1703
)
1695
1704
1696
- $(P Array literals are a comma-separated list of $(GLINK AssignExpression)s
1705
+ $(P Array literals are a comma-separated list of expressions
1697
1706
between square brackets $(D [) and $(D ]).
1698
- The $(I AssignExpression)s form the elements of a dynamic array,
1699
- the length of the array is the number of elements.
1700
- The common type of the all elements is taken to be the type of
1701
- the array element, and all elements are implicitly converted
1707
+ The expressions form the elements of a dynamic array.
1708
+ The length of the array is the number of elements.
1709
+ The common type of all the elements is taken to be the
1710
+ array element type , and each expression is implicitly converted
1702
1711
to that type.)
1703
1712
1704
1713
---
@@ -1739,9 +1748,10 @@ $(GNAME ArrayLiteral):
1739
1748
-------------
1740
1749
)
1741
1750
1742
- $(P If any of the arguments in the $(GLINK ArgumentList) are
1743
- a $(I ValueSeq), then the elements of the $(I ValueSeq)
1744
- are inserted as arguments in place of the sequence.
1751
+ $(P If any $(I ArrayMemberInitialization) is a
1752
+ $(DDSUBLINK spec/template, TemplateParameterSequence, ValueSeq),
1753
+ then the elements of the $(I ValueSeq)
1754
+ are inserted as expressions in place of the sequence.
1745
1755
)
1746
1756
1747
1757
$(P Escaping array literals are allocated on the memory managed heap.
0 commit comments