Skip to content

Commit 26b2265

Browse files
committed
Align PositionBridge#toString with Zinc
pos.toString formats the position as an offset rather than a line Fixes sbt/zinc#1089
1 parent e35b6ff commit 26b2265

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sbt-bridge/src/dotty/tools/xsbt/PositionBridge.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ public Optional<String> pointerSpace() {
123123

124124
@Override
125125
public String toString() {
126-
return pos.toString();
126+
Optional<String> path = sourcePath();
127+
if (path.isPresent())
128+
return path.get() + ":" + line().orElse(-1).toString();
129+
else
130+
return "";
127131
}
128132

129133
@Override

0 commit comments

Comments
 (0)