Skip to content

Commit 0591597

Browse files
committed
update docs
1 parent c76c4ee commit 0591597

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

compiler/src/dotty/tools/dotc/typer/Checking.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ trait Checking {
10731073
if !Inliner.inInlineMethod && !ctx.isInlineContext then
10741074
report.error(em"$what can only be used in an inline method", pos)
10751075

1076-
/** 1. Check that all case classes that extend `scala.Enum` are `enum` cases
1076+
/** 1. Check that all case classes that extend `scala.reflect.Enum` are `enum` cases
10771077
* 2. Check that parameterised `enum` cases do not extend java.lang.Enum.
10781078
* 3. Check that only a static `enum` base class can extend java.lang.Enum.
10791079
*/

docs/docs/reference/enums/enums.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ For a more in-depth example of using Scala 3 enums from Java, see [this test](ht
109109

110110
### Implementation
111111

112-
Enums are represented as `sealed` classes that extend the `scala.Enum` trait.
112+
Enums are represented as `sealed` classes that extend the `scala.reflect.Enum` trait.
113113
This trait defines two public methods, `ordinal` and `enumLabel`:
114114

115115
```scala
116-
package scala
116+
package scala.reflect
117117

118-
/** A base trait of all enum classes */
119-
trait Enum extends Product with Serializable {
118+
/** A base trait of all Scala enum definitions */
119+
super trait Enum extends Any with Product with Serializable {
120120

121121
/** A string uniquely identifying a case of an enum */
122122
def enumLabel: String
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package scala
22

3-
/** A base trait of all enum classes */
3+
/** A base trait of all Scala enum definitions */
44
@deprecated("scala.Enum has moved to scala.reflect.Enum", "3.0.0-M1")
55
type Enum = scala.reflect.Enum

tastydoc/test/dotty/tastydoc/Tests.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class Tests {
5555
//Individual files
5656
"scala.\\$times\\$colon*",
5757
"scala.Conversion*",
58-
"scala.Enum*",
5958
"scala.Eql*",
6059
"scala.forceInline*",
6160
"scala.FunctionXXL*",

0 commit comments

Comments
 (0)