You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/reference/enums/desugarEnums.md
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -93,17 +93,15 @@ map into case classes or vals.
93
93
94
94
This result is then further rewritten with rule (8).
95
95
96
-
6. If `E` is an enum with type parameters `Ts`, a class case with neither type parameters nor
97
-
an extends clause
96
+
6. If `E` is an enum with type parameters `Ts`, a class case with neither type parameters nor an extends clause
98
97
99
98
case C <value-params>
100
99
101
100
expands to
102
101
103
102
case C[Ts] <value-params> extends E[Ts]
104
103
105
-
This result is then further rewritten with rule (8). For class cases that have type parameters
106
-
themselves, an extends clause needs to be given explicitly.
104
+
This result is then further rewritten with rule (8). For class cases that have type parameters themselves, an extends clause needs to be given explicitly.
107
105
108
106
7. A value case
109
107
@@ -159,7 +157,7 @@ the following additional members.
159
157
- A method `enumValues` which returns an `Iterable[E]` of all singleton case
160
158
values in `E`, in the order of their definitions.
161
159
162
-
Companion objects that contain at least one simple case define in addition:
160
+
Companion objects of enumerations that contain at least one simple case define in addition:
163
161
164
162
- A private method `$new` which defines a new simple case value with given
165
163
ordinal number and name. This method can be thought as being defined as
@@ -182,5 +180,5 @@ this object or its members via `this` or a simple identifier is also illegal. Th
182
180
### Other Rules
183
181
184
182
A normal case class which is not produced from an enum case is not allowed to extend
185
-
`scala.Enum`. This ensures that the only cases of an anum are the ones that are
183
+
`scala.Enum`. This ensures that the only cases of an enum are the ones that are
0 commit comments