Skip to content

Align PositionBridge#toString impl with Zinc #14910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd put the column here too even though zinc didn't.

Copy link
Member Author

@adpi2 adpi2 Apr 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else
return "";
}

@Override
Expand Down