File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,18 @@ type TL1 = [v1 X >: L1 <: U1] => R1
4141type TL2 = [v2 X >: L2 <: U2 ] => R2
4242```
4343where ` v1 ` and ` v2 ` are optional variance annotations: ` + ` , ` - ` , or absent.
44- Then ` TL1 <: TL2 ` , if the type interval ` L2..U2 ` is contained in the type interval ` L1..U1 ` (i.e.
45- ` L1 <: L2 ` and ` U2 <: U1 ` ), and either ` v2 ` is absent or ` v1 = v2 ` .
44+ Then ` TL1 <: TL2 ` , if
45+
46+ - the type interval ` L2..U2 ` is contained in the type interval ` L1..U1 ` (i.e.
47+ ` L1 <: L2 ` and ` U2 <: U1 ` ),
48+ - either ` v2 ` is absent or ` v1 = v2 `
49+ - ` R1 <: R2 `
50+
51+ Here we have relied on alpha renaming to bring match the two bound types ` X ` .
52+
53+ A partially applied type constructor such as ` List ` is assumed to be equivalent to
54+ its eta expansion. I.e, ` List = ` [ +X] => List[ X] `. This allows type constructors
55+ to be compared with type lambdas.
4656
4757## Relationship with Parameterized Type Definitions
4858
You can’t perform that action at this time.
0 commit comments