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
4545In another word, ` A & B ` is the same type as ` B & A ` , in the sense that the two types
4646have the same values and are subtypes of each other.
4747
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:
5049
5150- If ` C ` is covariant, ` C[A] & C[B] ~> C[A & B] `
5251- If ` C ` is contravariant, ` C[A] & C[B] ~> C[A | B] `
52+ - If ` C ` is non-variant, emit a compile error
5353
5454When ` C ` is covariant, ` C[A & B] <: C[A] & C[B] ` can be derived:
5555
You can’t perform that action at this time.
0 commit comments