File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -362,7 +362,7 @@ class SyntheticMembers(thisPhase: DenotTransformer) {
362362
363363 /** For an enum T:
364364 *
365- * def ordinal(x: MirroredMonoType) = x.enumTag
365+ * def ordinal(x: MirroredMonoType) = x.ordinal
366366 *
367367 * For sealed trait with children of normalized types C_1, ..., C_n:
368368 *
@@ -377,7 +377,7 @@ class SyntheticMembers(thisPhase: DenotTransformer) {
377377 * O is O.type.
378378 */
379379 def ordinalBody (cls : Symbol , param : Tree )(implicit ctx : Context ): Tree =
380- if (cls.is(Enum )) param.select(nme.enumTag )
380+ if (cls.is(Enum )) param.select(nme.ordinal )
381381 else {
382382 val cases =
383383 for ((child, idx) <- cls.children.zipWithIndex) yield {
You can’t perform that action at this time.
0 commit comments