Skip to content

Commit 3922a04

Browse files
committed
Fix computation of inlineCallPrefix
1 parent ccad792 commit 3922a04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
201201

202202
private val (methPart, callTypeArgs, callValueArgss) = decomposeCall(call)
203203
private val inlinedMethod = methPart.symbol
204-
private val inlineCallPrefix = qualifier(methPart)
204+
private val inlineCallPrefix =
205+
qualifier(methPart).orElse(This(inlinedMethod.enclosingClass.asClass))
205206

206207
// Make sure all type arguments to the call are fully determined
207208
for (targ <- callTypeArgs) fullyDefinedType(targ.tpe, "inlined type argument", targ.span)

0 commit comments

Comments
 (0)