Skip to content

Commit 7adfa3f

Browse files
committed
adjust comment
1 parent 4d04804 commit 7adfa3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,8 @@ class Namer { typer: Typer =>
937937
if original.mods.isEnumClass then
938938
// in Desugar.scala, desugaring an enum class definition fixes the
939939
// first and second statements in the body to be `imports` and `getters`.
940-
// `getters` needs to be indexed after parents are resolved because it checks for a java.lang.Enum parent
940+
// `imports` is an import list of the enum cases from the companion of `cls`
941+
// `getters` will expand to `def ordinal: Int` if the parents of `cls` are not java.lang.Enum
941942
val (imports :: getters :: Nil, stats): @unchecked = restOfBody.splitAt(2)
942943
(getters :: Nil, imports :: stats)
943944
else

0 commit comments

Comments
 (0)