We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d04804 commit 7adfa3fCopy full SHA for 7adfa3f
compiler/src/dotty/tools/dotc/typer/Namer.scala
@@ -937,7 +937,8 @@ class Namer { typer: Typer =>
937
if original.mods.isEnumClass then
938
// in Desugar.scala, desugaring an enum class definition fixes the
939
// 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
+ // `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
942
val (imports :: getters :: Nil, stats): @unchecked = restOfBody.splitAt(2)
943
(getters :: Nil, imports :: stats)
944
else
0 commit comments