Skip to content

Commit 017edbd

Browse files
committed
Fix this bindings for ExprType
The issue is that we created bindings of the form `val xyz_this: => XYZ = ...`
1 parent 6acaf31 commit 017edbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
301301
private def registerType(tpe: Type): Unit = tpe match {
302302
case tpe: ThisType if !canElideThis(tpe) && !thisProxy.contains(tpe.cls) =>
303303
val proxyName = s"${tpe.cls.name}_this".toTermName
304-
val proxyType = tpe.asSeenFrom(inlineCallPrefix.tpe, inlinedMethod.owner)
304+
val proxyType = tpe.asSeenFrom(inlineCallPrefix.tpe, inlinedMethod.owner).widenIfUnstable
305305
thisProxy(tpe.cls) = newSym(proxyName, InlineProxy, proxyType).termRef
306306
if (!tpe.cls.isStaticOwner)
307307
registerType(inlinedMethod.owner.thisType) // make sure we have a base from which to outer-select

0 commit comments

Comments
 (0)