Skip to content

Commit 8a1810c

Browse files
authored
Merge pull request #8422 from DaniRey/patch-2
Add fact that & is commutative
2 parents e04d3a1 + f012b87 commit 8a1810c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ The members of an intersection type `A & B` are all the members of `A` and all
2929
the members of `B`. For instance `Resettable & Growable[String]`
3030
has member methods `reset` and `add`.
3131

32+
`&` is _commutative_: `A & B` is the same type as `B & A`.
33+
3234
If a member appears in both `A` and `B`, its type in `A & B` is the intersection
3335
of its type in `A` and its type in `B`. For instance, assume the definitions:
3436

0 commit comments

Comments
 (0)