Skip to content

Commit 4352e0d

Browse files
authored
Fix typo in RFC #52.
1 parent f4e3de1 commit 4352e0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

text/0052-choice.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ In addition, the existing `Mux` expression is made valid on the left-hand side o
124124

125125
```py
126126
def Mux(sel, val1, val0):
127-
return Choice(a).case(0, val0).default(val1)
127+
return Choice(sel).case(0, val0).default(val1)
128128
```
129129

130130
`ArrayProxy` (ie. the type currently returned by `Array` indexing) is changed from a native `Value` to a `ValueCastable` that lowers to `Choice` (removing the odd case where we can currently build an invaid `Value`). To avoid problems with lowering the out-of-bounds case, the value returned for out-of-bounds `Array` accesses is changed to 0.
@@ -180,4 +180,4 @@ The name is subject to bikeshed. An obvious alternative is `Match`, though this
180180
## Future possibilities
181181
[future-possibilities]: #future-possibilities
182182

183-
Optional guard conditions could be added to `Choice` and `m.Switch` cases (like Rust's `if` guards on `match` branches).
183+
Optional guard conditions could be added to `Choice` and `m.Switch` cases (like Rust's `if` guards on `match` branches).

0 commit comments

Comments
 (0)