Skip to content

Commit c1e031f

Browse files
committed
Add missing context source change
1 parent 83047c4 commit c1e031f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ class YCheckPositions extends Phases.Phase {
4040
assert(bindings.isEmpty)
4141
val old = sources
4242
sources = old.tail
43-
traverse(expansion)(inlineContext(EmptyTree))
43+
traverse(expansion)(inlineContext(EmptyTree).withSource(sources.head))
4444
sources = old
4545
case Inlined(call, bindings, expansion) =>
4646
bindings.foreach(traverse(_))
4747
sources = call.symbol.topLevelClass.source :: sources
4848
if (!isMacro(call)) // FIXME macro implementations can drop Inlined nodes. We should reinsert them after macro expansion based on the positions of the trees
49-
traverse(expansion)(inlineContext(call))
49+
traverse(expansion)(inlineContext(call).withSource(sources.head))
5050
sources = sources.tail
5151
case _ => traverseChildren(tree)
5252
}

0 commit comments

Comments
 (0)