Skip to content

Commit 21ce2e4

Browse files
Use typeRef on ctx.owner
1 parent 5b1be33 commit 21ce2e4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ object Inlines:
520520

521521
private val parentSym = symbolFromParent(parent)
522522

523-
private val thisInlineTrait = ThisType.raw(TypeRef(ctx.owner.prefix, ctx.owner))
523+
private val thisInlineTrait = ThisType.raw(ctx.owner.typeRef)
524524

525525
def expandDefs(overriddenDecls: Set[Symbol]): List[Tree] =
526526
val stats = Inlines.defsToInline(parentSym).filterNot(stat => overriddenDecls.contains(stat.symbol))
@@ -579,11 +579,12 @@ object Inlines:
579579
private def inlinedMember(sym: Symbol)(using Context): Symbol =
580580
sym.info match {
581581
case ClassInfo(prefix, cls, declaredParents, scope, selfInfo) =>
582+
val baseThisCls = ThisType.raw(ctx.owner.typeRef).select(sym)
582583
val inlinedSym = newClassSymbol(
583584
ctx.owner,
584585
sym.asType.name,
585586
sym.flags | Synthetic,
586-
clsSym => ClassInfo(inlinerTypeMap(prefix), clsSym, declaredParents :+ ThisType.raw(ctx.owner.typeRef).select(sym), Scopes.newScope, selfInfo)
587+
clsSym => ClassInfo(inlinerTypeMap(prefix), clsSym, declaredParents :+ baseThisCls, Scopes.newScope, selfInfo)
587588
)
588589
inlinedSym.setTargetName(sym.name ++ str.NAME_JOIN ++ ctx.owner.name)
589590
inlinedSym

0 commit comments

Comments
 (0)