Skip to content

Commit 67f0786

Browse files
committed
Make all enum cases instances of EnumValue statically
1 parent ba466e9 commit 67f0786

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/ast/DesugarEnums.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ object DesugarEnums {
306306
else {
307307
val (tag, scaffolding) = nextOrdinal(CaseKind.Simple)
308308
val creator = Apply(Ident(nme.DOLLAR_NEW), List(Literal(Constant(tag)), Literal(Constant(name.toString))))
309-
val vdef = ValDef(name, enumClassRef, creator).withMods(mods.withAddedFlags(EnumValue, span))
309+
val vdef = ValDef(name, TypeTree(), creator).withMods(mods.withAddedFlags(EnumValue, span))
310310
flatTree(scaffolding ::: vdef :: Nil).withSpan(span)
311311
}
312312
}

0 commit comments

Comments
 (0)