Skip to content

Commit

Permalink
Align PositionBridge#toString with Zinc
Browse files Browse the repository at this point in the history
pos.toString formats the position as an offset rather than a line

Fixes sbt/zinc#1089
  • Loading branch information
adpi2 committed Apr 12, 2022
1 parent e35b6ff commit 26b2265
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sbt-bridge/src/dotty/tools/xsbt/PositionBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ public Optional<String> pointerSpace() {

@Override
public String toString() {
return pos.toString();
Optional<String> path = sourcePath();
if (path.isPresent())
return path.get() + ":" + line().orElse(-1).toString();
else
return "";
}

@Override
Expand Down

0 comments on commit 26b2265

Please sign in to comment.