Skip to content

Commit 88f62e9

Browse files
authored
Untangle subtyping rules explanation in type-lambdas-spec.md
It is much more intuitive to think that TL2 is a subtype of TL1 (i.e. TL1 was introduced _before_ it was specialized by TL2) than other way around.
1 parent 15ea35b commit 88f62e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/_docs/reference/new-types/type-lambdas-spec.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ Assume two type lambdas
2626
type TL1 = [X >: L1 <: U1] =>> R1
2727
type TL2 = [X >: L2 <: U2] =>> R2
2828
```
29-
Then `TL1 <: TL2`, if
29+
Then `TL2 <: TL1`, if
3030

31-
- the type interval `L2..U2` is contained in the type interval `L1..U1` (i.e.
32-
`L1 <: L2` and `U2 <: U1`),
33-
- `R1 <: R2`
31+
- the type interval `L1..U1` is contained in the type interval `L2..U2` (i.e.
32+
`L2 <: L1` and `U1 <: U2`),
33+
- `R2 <: R1`
3434

3535
Here we have relied on [alpha renaming](https://en.wikipedia.org/wiki/Lambda_calculus#%CE%B1-conversion) to match the two bound types `X`.
3636

0 commit comments

Comments
 (0)