@@ -209,8 +209,8 @@ let bar = match 42 {
209
209
let baz = [a , b , c ];
210
210
```
211
211
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
214
214
` [LubCoerce(typeof(a), typeof(b), typeof(c)); 3] ` .
215
215
216
216
LUB coercion is performed by the following algorithm:
@@ -251,10 +251,10 @@ LUB coercion has the following properties:
251
251
252
252
Note the feature No. 3, it uses the word "means" rather than "if and only if".
253
253
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
255
255
special situation where we can get ` LubCoerce(ty0, ty1) == Some(ty2) ` :
256
256
` 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).
258
258
259
259
When an expression that performs LUB coercion has an expected type, the
260
260
expected type is added to the list of types the coercion operates on. So,
0 commit comments