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
2132
2132
buf += inlineExpansion(mdef1)
2133
2133
// replace body with expansion, because it will be used as inlined body
2134
2134
// 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
2135
2140
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
2144
2142
}
2145
2143
traverse(rest)
2146
2144
}
You can’t perform that action at this time.
0 commit comments