Skip to content

Commit 7ae13f0

Browse files
committed
use QuoteUtils.changeOwner for inliner
1 parent 369db24 commit 7ae13f0

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
@@ -30,6 +30,7 @@ import collection.mutable
3030
import reporting.trace
3131
import util.Spans.Span
3232
import dotty.tools.dotc.transform.{Splicer, TreeMapWithStages}
33+
import quoted.QuoteUtils
3334

3435
object Inliner {
3536
import tpd._
@@ -520,7 +521,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(using Context) {
520521
ref(rhsClsSym.sourceModule)
521522
else
522523
inlineCallPrefix
523-
val binding = ValDef(selfSym.asTerm, rhs).withSpan(selfSym.span).setDefTree
524+
val binding = ValDef(selfSym.asTerm, QuoteUtils.changeOwnerOfTree(rhs, selfSym)).withSpan(selfSym.span).setDefTree
524525
bindingsBuf += binding
525526
inlining.println(i"proxy at $level: $selfSym = ${bindingsBuf.last}")
526527
lastSelf = selfSym

0 commit comments

Comments
 (0)