Skip to content

Commit 962bc82

Browse files
authored
Merge pull request #2836 from dotty-staging/fix-implicit-pos
Fix position of implicit conversions for IDEs
2 parents 7820b5f + d55c84b commit 962bc82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ trait Implicits { self: Typer =>
773773
def typedImplicit(cand: Candidate)(implicit ctx: Context): SearchResult = track("typedImplicit") { ctx.traceIndented(i"typed implicit ${cand.ref}, pt = $pt, implicitsEnabled == ${ctx.mode is ImplicitsEnabled}", implicits, show = true) {
774774
assert(constr eq ctx.typerState.constraint)
775775
val ref = cand.ref
776-
var generated: Tree = tpd.ref(ref).withPos(pos)
776+
var generated: Tree = tpd.ref(ref).withPos(pos.startPos)
777777
if (!argument.isEmpty)
778778
generated = typedUnadapted(
779779
untpd.Apply(untpd.TypedSplice(generated), untpd.TypedSplice(argument) :: Nil),

0 commit comments

Comments
 (0)