Skip to content

Commit 29eece8

Browse files
committed
[CloudKit overlay] Work around an NSError bridging issue specific to CKError.
While here, fix up the type signature of CKError.partialErrorsByItemID; it doesn't make sense to use NSObject now that we have AnyHashable. Fixes rdar://problem/27936562. (cherry picked from commit 661df18)
1 parent eb68737 commit 29eece8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stdlib/public/SDK/CloudKit/CloudKit.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import Foundation
44
@available(macOS 10.10, iOS 8.0, *)
55
extension CKError {
66
/// Retrieve partial error results associated by item ID.
7-
public var partialErrorsByItemID: [NSObject : Error]? {
8-
return userInfo[CKPartialErrorsByItemIDKey] as? [NSObject : Error]
7+
public var partialErrorsByItemID: [AnyHashable: Error]? {
8+
return userInfo[CKPartialErrorsByItemIDKey] as? [AnyHashable: NSError]
9+
as? [AnyHashable: Error]
910
}
1011

1112
/// The original CKRecord object that you used as the basis for

0 commit comments

Comments
 (0)