File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,8 @@ object DesugarEnums {
6464 }
6565
6666 /** A type tree referring to `enumClass` */
67- def enumClassRef (implicit ctx : Context ) = TypeTree (enumClass.typeRef)
67+ def enumClassRef (implicit ctx : Context ) =
68+ if (enumClass.exists) TypeTree (enumClass.typeRef) else TypeTree ()
6869
6970 /** Add implied flags to an enum class or an enum case */
7071 def addEnumFlags (cdef : TypeDef )(implicit ctx : Context ) =
Original file line number Diff line number Diff line change @@ -415,7 +415,7 @@ class Namer { typer: Typer =>
415415
416416 /** Expand tree and store in `expandedTree` */
417417 def expand (tree : Tree )(implicit ctx : Context ): Unit = tree match {
418- case mdef : DefTree if ! ctx.reporter.hasErrors =>
418+ case mdef : DefTree =>
419419 val expanded = desugar.defTree(mdef)
420420 typr.println(i " Expansion: $mdef expands to $expanded" )
421421 if (expanded ne mdef) mdef.pushAttachment(ExpandedTree , expanded)
You can’t perform that action at this time.
0 commit comments