Skip to content

Commit 67745e5

Browse files
authored
Specify the interaction between record expressions and constant contexts (#3630)
1 parent 1af8233 commit 67745e5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

accepted/3.0/records/feature-specification.md

+4
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ not captured by the grammar. It is a compile-time error if a record has any of:
133133
field. *For example: `('pos', $1: 'named')` since the named field "$1"
134134
collides with the getter for the first positional field.*
135135

136+
Let _R_ be a record expression that occurs in a constant context, or a
137+
record expression whose first token is `const`. In this case, each record
138+
field in _R_ occurs in a constant context.
139+
136140
In order to avoid ambiguity with parenthesized expressions, a record with
137141
only a single positional field must have a trailing comma:
138142

0 commit comments

Comments
 (0)