Skip to content

Commit 720eb86

Browse files
committed
Improve debugDescription of Diagnostic
Since `SourceLocation` is no longer `ExpressibleByDebugDescription` due to the addition of `presumedFile` and `presumedLine`, we need to manually print just line and column here.
1 parent 1f4ebd9 commit 720eb86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftDiagnostics/Diagnostic.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public struct Diagnostic: CustomDebugStringConvertible {
7070
public var debugDescription: String {
7171
let locationConverter = SourceLocationConverter(file: "", tree: node.root)
7272
let location = location(converter: locationConverter)
73-
return "\(location): \(message)"
73+
return "\(location.line):\(location.column): \(message)"
7474
}
7575
}
7676

0 commit comments

Comments
 (0)