Skip to content

Commit 8b814cf

Browse files
Merge pull request #2643 from ScalaWilliam/patch-1
Fix misspelling: update intersection-types.md in docs
2 parents 02f765b + f0cb3bc commit 8b814cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/docs/reference/intersection-types.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ title: "Intersection Types"
66
Used on types, the `&` operator creates an intersection type.
77

88
```scala
9-
trait Resetable {
9+
trait Resettable {
1010
def reset(): this.type
1111
}
1212
trait Growable[T] {
1313
def add(x: T): this.type
1414
}
15-
def f(x: Resetable & Growable[String]) = {
15+
def f(x: Resettable & Growable[String]) = {
1616
x.reset()
1717
x.add("first")
1818
}
1919
```
2020

21-
The value `x` is required to be _both_ a `Resetable` and a
21+
The value `x` is required to be _both_ a `Resettable` and a
2222
`Growable[String]`. Intersection types `A & B` replace compound types
2323
`A with B` in Scala 2 (for the moment, `A with B` is still allowed, but
2424
it will be deprecated and removed in the future).
@@ -27,7 +27,7 @@ Unlike `with` types, `&` is _commutative_: `A & B` is the same type as
2727
`B & A`.
2828

2929
The members of an intersection type `A & B` are all the members of `A`
30-
and all the members of `B`. For instance `Resetable & Growable[String]`
30+
and all the members of `B`. For instance `Resettable & Growable[String]`
3131
has member methods `reset` and `add`.
3232

3333
If a member appears in both `A` and `B`, its type in `A & B` is the

0 commit comments

Comments
 (0)