Skip to content

Commit 080ae88

Browse files
flomebulSporarum
andauthored
Update _tour/compound-types.md
Co-authored-by: Quentin Bernet <[email protected]>
1 parent 95d4624 commit 080ae88

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

_tour/compound-types.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def cloneAndReset(obj: Cloneable with Resetable): Cloneable = {
7272
}
7373
```
7474
Compound types can consist of several object types and they may have a single refinement which can be used to narrow the signature of existing object members.
75-
The general form is: `A with B with C ... { refinement }`
75+
Note that you can have more than two types: `A with B with C with ...`.
76+
This means the same as thing as `(...(A with B) with C`) with ... )`
7677
{% endtab %}
7778
{% tab 'Scala 3' for=compound-types_3 %}
7879
This compound type is written like this in Scala: `Cloneable & Resetable`.

0 commit comments

Comments
 (0)