Skip to content

Commit fd70613

Browse files
Inlined arguments have spans from other files
1 parent d8ed01f commit fd70613

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,10 +583,10 @@ class Inliner(val call: tpd.Tree)(using Context):
583583
val inlinedCtx = ctx.withSource(inlinedMethod.topLevelClass.source)
584584
paramProxy.get(tree.tpe) match {
585585
case Some(t) if tree.isTerm && t.isSingleton =>
586-
val inlinedSingleton = singleton(t).withSpan(argSpan)
586+
val inlinedSingleton = singleton(t).withSpan(tree.span)
587587
inlinedFromOutside(inlinedSingleton)(tree.span)
588588
case Some(t) if tree.isType =>
589-
inlinedFromOutside(TypeTree(t).withSpan(argSpan))(tree.span)
589+
inlinedFromOutside(TypeTree(t).withSpan(tree.span))(tree.span)
590590
case _ => tree
591591
}
592592
case tree @ Select(qual: This, name) if tree.symbol.is(Private) && tree.symbol.isInlineMethod =>

0 commit comments

Comments
 (0)