File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -2128,16 +2128,15 @@ class Typer extends Namer
2128
2128
buf += inlineExpansion(mdef1)
2129
2129
// replace body with expansion, because it will be used as inlined body
2130
2130
// from separately compiled files - the original BodyAnnotation is not kept.
2131
+ case mdef1 : DefDef if MemoCacheName .currentCount(nme.memo) != memoCacheCount =>
2132
+ buf ++= Inliner .memoCacheDefs(mdef1.rhs) += mdef1
2133
+ case mdef1 : TypeDef if mdef1.symbol.is(Enum , butNot = Case ) =>
2134
+ enumContexts(mdef1.symbol) = ctx
2135
+ buf += mdef1
2136
+ case EmptyTree =>
2137
+ // clashing synthetic case methods are converted to empty trees, drop them here
2131
2138
case mdef1 =>
2132
- mdef1 match {
2133
- case mdef1 : TypeDef if mdef1.symbol.flags.is(Enum , butNot = Case ) =>
2134
- enumContexts(mdef1.symbol) = ctx
2135
- case mdef1 : DefDef if MemoCacheName .currentCount(nme.memo) != memoCacheCount =>
2136
- buf ++= Inliner .memoCacheDefs(mdef1.rhs)
2137
- case _ =>
2138
- }
2139
- if (! mdef1.isEmpty) // clashing synthetic case methods are converted to empty trees
2140
- buf += mdef1
2139
+ buf += mdef1
2141
2140
}
2142
2141
traverse(rest)
2143
2142
}
You can’t perform that action at this time.
0 commit comments