File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Sources/Testing/SourceAttribution Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -168,9 +168,11 @@ extension SourceLocation: Codable {
168
168
private enum _CodingKeys : String , CodingKey {
169
169
case fileID
170
170
case filePath
171
- case _filePath
172
171
case line
173
172
case column
173
+
174
+ /// A backwards-compatible synonym of ``filePath``.
175
+ case _filePath
174
176
}
175
177
176
178
public func encode( to encoder: any Encoder ) throws {
@@ -192,8 +194,8 @@ extension SourceLocation: Codable {
192
194
193
195
// For simplicity's sake, we won't be picky about which key contains the
194
196
// file path.
195
- filePath = try container. decodeIfPresent ( String . self, forKey: . _filePath )
196
- ?? try container. decode ( String . self, forKey: . filePath )
197
+ filePath = try container. decodeIfPresent ( String . self, forKey: . filePath )
198
+ ?? container. decode ( String . self, forKey: . _filePath )
197
199
}
198
200
}
199
201
You can’t perform that action at this time.
0 commit comments