File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -543,12 +543,14 @@ Enum class $E$ is a special kind of class with the following properties:
543
543
544
544
Enum class body uses special kind of syntax (see grammar) to declare enum entries in addition to all other declarations inside the class body .
545
545
Enum entries have their own bodies that may contain their own declarations, similar to [object declarations][Classifier declaration].
546
- Enum entries don' t introduce their own type, they are always considered to be of type `E`.
547
- As a result, no members can be accessed outside the scope of the enum entry body, other than those overriden from `E` .
548
546
549
547
> Note : an enum class can have zero enum entries.
550
548
> This makes objects of this class impossible to construct.
551
549
550
+ Enum entries don' t introduce their own type, they are always considered to be of type `E`.
551
+
552
+ > Note: in most platforms, enum entries are governed by the same rules as [anonymous object types][Object literals].
553
+
552
554
Every enum entry of class `E` implicitly overrides members of `kotlin.Enum<E>` in the following way:
553
555
554
556
- ```kotlin
You can’t perform that action at this time.
0 commit comments