From 88ba77d0bc182dcf6eac916f7230818e891637c9 Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Mena Date: Fri, 22 Sep 2023 10:50:15 +0200 Subject: [PATCH] Clarification over constructors of enum entries --- docs/src/md/kotlin.core/declarations.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/src/md/kotlin.core/declarations.md b/docs/src/md/kotlin.core/declarations.md index 59bd6b678..103ebc35e 100644 --- a/docs/src/md/kotlin.core/declarations.md +++ b/docs/src/md/kotlin.core/declarations.md @@ -542,6 +542,9 @@ Enum class $E$ is a special kind of class with the following properties: > Note: for the purposes of overload resolution, enum entries are considered to be [static member callables][Call with an explicit type receiver] of the enum class type Enum class body uses special kind of syntax (see grammar) to declare enum entries in addition to all other declarations inside the class body. +The name of each enum entry must be followed by the corresponding arguments for the enum class constructor; +except when no arguments are given, in that case the parentheses may be dropped. + Enum entries have their own bodies that may contain their own declarations, similar to [object declarations][Classifier declaration]. > Note: an enum class can have zero enum entries.