Skip to content

Commit

Permalink
dont introduce new API
Browse files Browse the repository at this point in the history
  • Loading branch information
bishabosha committed Oct 14, 2024
1 parent 54ddb42 commit 44ecf4b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ trait BCodeSkelBuilder extends BCodeHelpers {
val nr =
val sourcePos = tree.sourcePos
(
if sourcePos.exists then sourcePos.finalPosition.line
if sourcePos.exists then sourcePos.source.positionInUltimateSource(sourcePos).line
else ctx.source.offsetToLine(tree.span.point) // fallback
) + 1

Expand Down
5 changes: 0 additions & 5 deletions compiler/src/dotty/tools/dotc/util/SourcePosition.scala
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ extends SrcPos, interfaces.SourcePosition, Showable {
rec(this)
}

def finalPosition: SourcePosition = {
source.positionInUltimateSource(this)
}


override def toString: String =
s"${if (source.exists) source.file.toString else "(no source)"}:$span"

Expand Down

0 comments on commit 44ecf4b

Please sign in to comment.