Skip to content

Commit 37299f2

Browse files
authored
Typos in expressions.md on inspect expressions. (#1094)
Signed-off-by: gregmarr <[email protected]>
1 parent d136153 commit 37299f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/cpp2/expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ An `inspect expr -> Type = { /* alternatives */ }` expression allows pattern mat
177177

178178
- `expr` is evaluated once.
179179

180-
- Each alternative is spelled `is C = statement;` and are evaluated in order. Each `is C` is evaluated if called with `expr is C`, and if it alternative evaluates to `#!cpp true`, then its `#!cpp = alternative;` body is used as the value of the entire `inspect` expression, and the meaning is the same as if the entire `inspect` expression had been written as just `#!cpp :Type = alternative;` — i.e., an unnamed object expression (aka 'temporary object') of type `Type` initialized with `alternative`.
180+
- Each alternative is spelled `is C = statement;` and are evaluated in order. Each `is C` is evaluated as if called with `expr is C`, and if it evaluates to `#!cpp true`, then its `#!cpp = alternative;` body is used as the value of the entire `inspect` expression, and the meaning is the same as if the entire `inspect` expression had been written as just `#!cpp :Type = alternative;` — i.e., an unnamed object expression (aka 'temporary object') of type `Type` initialized with `alternative`.
181181

182182
- A catchall `is _` is required.
183183

0 commit comments

Comments
 (0)