Skip to content

Commit edda76f

Browse files
committed
Apply nits
1 parent d9fc1a1 commit edda76f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/type-coercions.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ let bar = match 42 {
209209
let baz = [a, b, c];
210210
```
211211

212-
In this example, both `foo` and `bar` have the type
213-
`LubCoerce(typeof(a), typeof(a), typeof(c))` and `baz` have the type
212+
In this example, both `foo` and `bar` has the type
213+
`LubCoerce(typeof(a), typeof(a), typeof(c))` and `baz` has the type
214214
`[LubCoerce(typeof(a), typeof(b), typeof(c)); 3]`.
215215

216216
LUB coercion is performed by the following algorithm:
@@ -251,10 +251,10 @@ LUB coercion has the following properties:
251251

252252
Note the feature No. 3, it uses the word "means" rather than "if and only if".
253253
That's because currently if `ty0` and `ty1` can be coerced to `ty2` and
254-
unfortunately `ty2` equals to neither `ty0` nor `ty1`, there are only one
254+
if `ty2` equals to neither `ty0` nor `ty1`, there is only one
255255
special situation where we can get `LubCoerce(ty0, ty1) == Some(ty2)`:
256256
`LubCoerce((FnDef | Closure), (FnDef | Closure)) == Some(FnPtr)` (where Closure
257-
is non-capturing). You can check it with the pseudo code.
257+
is non-capturing).
258258

259259
When an expression that performs LUB coercion has an expected type, the
260260
expected type is added to the list of types the coercion operates on. So,

0 commit comments

Comments
 (0)