Skip to content

Commit b45817e

Browse files
gdamoredlang-bot
authored andcommitted
StringLiterals (implicit concatenation) is not a thing.
1 parent c906566 commit b45817e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

spec/expression.dd

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ $(GNAME PrimaryExpression):
16071607
$(GLINK_LEX IntegerLiteral)
16081608
$(GLINK_LEX FloatLiteral)
16091609
$(LEGACY_LNAME2 CharacterLiteral)$(LEGACY_LNAME2 character-literal)$(GLINK_LEX CharacterLiteral)
1610-
$(GLINK StringLiterals)
1610+
$(GLINK_LEX StringLiteral)
16111611
$(GLINK ArrayLiteral)
16121612
$(GLINK AssocArrayLiteral)
16131613
$(GLINK FunctionLiteral)
@@ -1699,9 +1699,12 @@ $(H3 $(LNAME2 null, null))
16991699
$(H3 $(LNAME2 string_literals, String Literals))
17001700

17011701
$(GRAMMAR
1702-
$(GNAME StringLiterals):
1703-
$(GLINK_LEX StringLiteral)
1704-
$(GSELF StringLiterals) $(GLINK_LEX StringLiteral)
1702+
$(GNAME StringLiteral):
1703+
$(GLINK_LEX WysiwygString)
1704+
$(GLINK_LEX AlternateWysiwygString)
1705+
$(GLINK_LEX DoubleQuotedString)
1706+
$(GLINK_LEX DelimitedString)
1707+
$(GLINK_LEX TokenString)
17051708
)
17061709

17071710
$(P String literals can implicitly convert to any
@@ -1748,6 +1751,11 @@ $(GNAME StringLiterals):
17481751
string literal.
17491752
)
17501753

1754+
$(P Concatenation of string literals requires the use of the
1755+
`~` operator, and is resolved at compile time.
1756+
C style implicit concatenation without an intervening operator is
1757+
error prone and not supported in D.)
1758+
17511759
$(H3 $(LNAME2 array_literals, Array Literals))
17521760

17531761
$(GRAMMAR

0 commit comments

Comments
 (0)