Skip to content

Commit 44ecf4b

Browse files
committed
dont introduce new API
1 parent 54ddb42 commit 44ecf4b

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

compiler/src/dotty/tools/backend/jvm/BCodeSkelBuilder.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ trait BCodeSkelBuilder extends BCodeHelpers {
626626
val nr =
627627
val sourcePos = tree.sourcePos
628628
(
629-
if sourcePos.exists then sourcePos.finalPosition.line
629+
if sourcePos.exists then sourcePos.source.positionInUltimateSource(sourcePos).line
630630
else ctx.source.offsetToLine(tree.span.point) // fallback
631631
) + 1
632632

compiler/src/dotty/tools/dotc/util/SourcePosition.scala

-5
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ extends SrcPos, interfaces.SourcePosition, Showable {
7979
rec(this)
8080
}
8181

82-
def finalPosition: SourcePosition = {
83-
source.positionInUltimateSource(this)
84-
}
85-
86-
8782
override def toString: String =
8883
s"${if (source.exists) source.file.toString else "(no source)"}:$span"
8984

0 commit comments

Comments
 (0)