Skip to content

Commit 4425e16

Browse files
committed
since boundSym is new, no need to use check in QuoteUtils.changeOwner
1 parent 3f8abf9 commit 4425e16

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,9 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(using Context) {
461461
else (inlineFlags, argtpe.widen)
462462
val boundSym = newSym(InlineBinderName.fresh(name.asTermName), bindingFlags, bindingType).asTerm
463463
val binding = {
464-
if (isByName) DefDef(boundSym, arg.changeOwner(ctx.owner, boundSym))
465-
else ValDef(boundSym, QuoteUtils.changeOwnerOfTree(arg, boundSym))
464+
val newArg = arg.changeOwner(ctx.owner, boundSym)
465+
if (isByName) DefDef(boundSym, newArg)
466+
else ValDef(boundSym, newArg)
466467
}.withSpan(boundSym.span)
467468
bindingsBuf += binding.setDefTree
468469
binding

0 commit comments

Comments
 (0)