Skip to content

Commit 379f28b

Browse files
authored
Merge pull request #1091 from itaiferber/non-optional-coding-paths
Make coding paths non-optional [DO NOT MERGE]
2 parents d8c2af3 + 7d0410b commit 379f28b

File tree

3 files changed

+130
-83
lines changed

3 files changed

+130
-83
lines changed

Foundation/Codable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ internal extension DecodingError {
1818
/// - parameter expectation: The type expected to be encountered.
1919
/// - parameter reality: The value that was encountered instead of the expected type.
2020
/// - returns: A `DecodingError` with the appropriate path and debug description.
21-
internal static func _typeMismatch(at path: [CodingKey?], expectation: Any.Type, reality: Any) -> DecodingError {
21+
internal static func _typeMismatch(at path: [CodingKey], expectation: Any.Type, reality: Any) -> DecodingError {
2222
let description = "Expected to decode \(expectation) but found \(_typeDescription(of: reality)) instead."
2323
return .typeMismatch(expectation, Context(codingPath: path, debugDescription: description))
2424
}

0 commit comments

Comments
 (0)