Skip to content

Commit a99f0b6

Browse files
committed
Spec: Address review comments except volatility.
1 parent 6021b7b commit a99f0b6

File tree

2 files changed

+115
-64
lines changed

2 files changed

+115
-64
lines changed

docs/_docs/reference/new-types/intersection-types-spec.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ A & B <: B A & B <: A
4646
In another word, `A & B` is the same type as `B & A`, in the sense that the two types
4747
have the same values and are subtypes of each other.
4848

49-
If `C` is a type constructor, then `C[A] & C[B]` can be simplified using the following three rules:
49+
If `C` is a co- or contravariant type constructor, then `C[A] & C[B]` can be simplified using the following rules:
5050

5151
- If `C` is covariant, `C[A] & C[B] ~> C[A & B]`
5252
- If `C` is contravariant, `C[A] & C[B] ~> C[A | B]`
53-
- If `C` is non-variant, emit a compile error
5453

5554
When `C` is covariant, `C[A & B] <: C[A] & C[B]` can be derived:
5655

0 commit comments

Comments
 (0)