File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
docs/docs/reference/new-types Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ A & B <: B A & B <: A
45
45
In another word, ` A & B ` is the same type as ` B & A ` , in the sense that the two types
46
46
have the same values and are subtypes of each other.
47
47
48
- If ` C ` is a type constructor, the join ` C[A] & C[B] ` is simplified by pulling the
49
- intersection inside the constructor, using the following two rules:
48
+ If ` C ` is a type constructor, then ` C[A] & C[B] ` can be simplified using the following three rules:
50
49
51
50
- If ` C ` is covariant, ` C[A] & C[B] ~> C[A & B] `
52
51
- If ` C ` is contravariant, ` C[A] & C[B] ~> C[A | B] `
52
+ - If ` C ` is non-variant, emit a compile error
53
53
54
54
When ` C ` is covariant, ` C[A & B] <: C[A] & C[B] ` can be derived:
55
55
You can’t perform that action at this time.
0 commit comments