Skip to content

Commit fe1355a

Browse files
committed
Change wording
1 parent 6c19236 commit fe1355a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

docs/docs/reference/enums/adts.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,7 @@ scala> Option.None
4848
val res2: t2.Option[Nothing] = None
4949
```
5050

51-
Note that the type of the expressions above is always `Option`. That
52-
is, the implementation case classes are not visible in the result
53-
types of their `apply` methods. This is a subtle difference with
54-
respect to normal case classes. The classes making up the cases do
55-
exist, and can be unveiled, either by constructing them directly with a `new`,
56-
or by explicitly providing an expected type.
57-
51+
Note that the type of the expressions above is always `Option`. Generally, the type of a enum case constructor application will be widened to the underlying enum type, unless a more specific type is expected. This is a subtle difference with respect to normal case classes. The classes making up the cases do exist, and can be unveiled, either by constructing them directly with a `new`, or by explicitly providing an expected type.
5852

5953
```scala
6054
scala> new Option.Some(2)

0 commit comments

Comments
 (0)