Skip to content

Commit 96941a0

Browse files
Register class-like symbol to be replaced by inliner
Instruct the inliner that all references to the old symbol of the inner class must be replaced with references to the symbol of the class-like we just generated
1 parent 4e35c32 commit 96941a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,12 +604,13 @@ object Inlines:
604604
(sym.flags | Synthetic) &~ withoutFlags,
605605
newCls => {
606606
val ClassInfo(prefix, _, parents, _, selfInfo) = inlinerTypeMap.mapClassInfo(clsInfo)
607-
ClassInfo(prefix, newCls, parents :+ ctx.owner.thisType.select(sym), Scopes.newScope, selfInfo) // TODO check if need to add type params to new parent
607+
ClassInfo(prefix, newCls, parents :+ ctx.owner.thisType.select(sym), Scopes.newScope, selfInfo) // TODO fix new parent type (wrong symbol?)
608608
},
609609
sym.privateWithin,
610610
spanCoord(parent.span)
611611
)
612612
inlinedSym.setTargetName(sym.name ++ str.NAME_JOIN ++ ctx.owner.name)
613+
innerClassNewSyms.put(sym, inlinedSym)
613614
inlinedSym.entered
614615
case _ =>
615616
report.error(s"Class symbol ${sym.show} does not have class info")

0 commit comments

Comments
 (0)