Skip to content

Commit 383e771

Browse files
Inline code of thisType at sole call site
1 parent fe18b0e commit 383e771

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/src/dotty/tools/dotc/inlines/Inlines.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,6 @@ object Inlines:
523523

524524
private val parentSym = symbolFromParent(parent)
525525

526-
private val thisInlineTrait = ThisType.raw(ctx.owner.typeRef)
527-
528526
def expandDefs(overriddenDecls: Set[Symbol]): List[Tree] =
529527
val stats = Inlines.defsToInline(parentSym).filterNot(stat => overriddenDecls.contains(stat.symbol))
530528
val inlinedSymbols = stats.map(stat => inlinedSym(stat.symbol))
@@ -533,7 +531,7 @@ object Inlines:
533531

534532
protected class InlineTraitTypeMap extends InlinerTypeMap {
535533
override def apply(t: Type) = t match {
536-
case t: ThisType if t.cls == parentSym => thisInlineTrait
534+
case t: ThisType if t.cls == parentSym => ctx.owner.thisType
537535
case t => super.apply(t)
538536
}
539537
}

0 commit comments

Comments
 (0)