Skip to content

Commit cf995b5

Browse files
committed
Properly set positions of inlined implicits
1 parent 83e28e3 commit cf995b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,7 +1957,7 @@ final class SearchRoot extends SearchHistory {
19571957
// Substitute dictionary references into dictionary entry RHSs
19581958
val rhsMap = new TreeTypeMap(treeMap = {
19591959
case id: Ident if vsymMap.contains(id.symbol) =>
1960-
tpd.ref(vsymMap(id.symbol))
1960+
tpd.ref(vsymMap(id.symbol))(ctx.withSource(id.source)).withSpan(id.span)
19611961
case tree => tree
19621962
})
19631963
val nrhss = rhss.map(rhsMap(_))
@@ -1981,7 +1981,7 @@ final class SearchRoot extends SearchHistory {
19811981

19821982
val res = resMap(tree)
19831983

1984-
val blk = Inliner.reposition(Block(classDef :: inst :: Nil, res), span)
1984+
val blk = Block(classDef :: inst :: Nil, res).withSpan(span)
19851985

19861986
success.copy(tree = blk)(success.tstate, success.gstate)
19871987
}

0 commit comments

Comments
 (0)