Skip to content

Commit e0b775d

Browse files
authored
Merge pull request #10729 from itaiferber/4.0-non-optional-coding-paths
[4.0] Make coding paths non-optional [DO NOT MERGE]
2 parents 63eed0f + c8a8d83 commit e0b775d

File tree

6 files changed

+310
-225
lines changed

6 files changed

+310
-225
lines changed

stdlib/public/SDK/Foundation/Codable.swift

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

0 commit comments

Comments
 (0)