Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,7 @@ ObsoleteRangePattern ->
RangePatternBound `...` RangePatternBound

RangePatternBound ->
CHAR_LITERAL
| BYTE_LITERAL
| `-`? INTEGER_LITERAL
| `-`? FLOAT_LITERAL
LiteralPattern
| PathExpression
```

Expand Down Expand Up @@ -553,7 +550,11 @@ A bound is written as one of:

* A character, byte, integer, or float literal.
* A `-` followed by an integer or float literal.
* A [path]
* A [path].

> [!NOTE]
>
> We syntactically accept more than this for a *[RangePatternBound]*. We later reject the other things semantically.

r[patterns.range.constraint-bound-path]
If a bound is written as a path, after macro resolution, the path must resolve to a constant item of the type `char`, an integer type, or a float type.
Expand Down