File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -2132,15 +2132,13 @@ class Typer extends Namer
21322132 buf += inlineExpansion(mdef1)
21332133 // replace body with expansion, because it will be used as inlined body
21342134 // from separately compiled files - the original BodyAnnotation is not kept.
2135+ case mdef1 : TypeDef if mdef1.symbol.is(Enum , butNot = Case ) =>
2136+ enumContexts(mdef1.symbol) = ctx
2137+ buf += mdef1
2138+ case EmptyTree =>
2139+ // clashing synthetic case methods are converted to empty trees, drop them here
21352140 case mdef1 =>
2136- import untpd .modsDeco
2137- mdef match {
2138- case mdef : untpd.TypeDef if mdef.mods.isEnumClass =>
2139- enumContexts(mdef1.symbol) = ctx
2140- case _ =>
2141- }
2142- if (! mdef1.isEmpty) // clashing synthetic case methods are converted to empty trees
2143- buf += mdef1
2141+ buf += mdef1
21442142 }
21452143 traverse(rest)
21462144 }
You can’t perform that action at this time.
0 commit comments