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) {
362
362
363
363
/** For an enum T:
364
364
*
365
- * def ordinal(x: MirroredMonoType) = x.enumTag
365
+ * def ordinal(x: MirroredMonoType) = x.ordinal
366
366
*
367
367
* For sealed trait with children of normalized types C_1, ..., C_n:
368
368
*
@@ -377,7 +377,7 @@ class SyntheticMembers(thisPhase: DenotTransformer) {
377
377
* O is O.type.
378
378
*/
379
379
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 )
381
381
else {
382
382
val cases =
383
383
for ((child, idx) <- cls.children.zipWithIndex) yield {
You can’t perform that action at this time.
0 commit comments