Skip to content

Commit dbc9709

Browse files
committed
fix NSError for SE-0110
1 parent 31a820f commit dbc9709

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Foundation/NSError.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public class NSError : NSObject, NSCopying, NSSecureCoding, NSCoding {
5959
if let info = aDecoder.decodeObjectOfClasses([NSSet.self, NSDictionary.self, NSArray.self, NSString.self, NSNumber.self, NSData.self, NSURL.self], forKey: "NSUserInfo") as? NSDictionary {
6060
var filteredUserInfo = [String : Any]()
6161
// user info must be filtered so that the keys are all strings
62-
info.enumerateKeysAndObjects([]) {
63-
if let key = $0.0 as? NSString {
64-
filteredUserInfo[key._swiftObject] = $0.1
62+
info.enumerateKeysAndObjects([]) { key, object, _ in
63+
if let key = key as? NSString {
64+
filteredUserInfo[key._swiftObject] = object
6565
}
6666
}
6767
_userInfo = filteredUserInfo
@@ -74,9 +74,9 @@ public class NSError : NSObject, NSCopying, NSSecureCoding, NSCoding {
7474
if let info = aDecoder.decodeObject() as? NSDictionary {
7575
var filteredUserInfo = [String : Any]()
7676
// user info must be filtered so that the keys are all strings
77-
info.enumerateKeysAndObjects([]) {
78-
if let key = $0.0 as? NSString {
79-
filteredUserInfo[key._swiftObject] = $0.1
77+
info.enumerateKeysAndObjects([]) { key, object, _ in
78+
if let key = key as? NSString {
79+
filteredUserInfo[key._swiftObject] = object
8080
}
8181
}
8282
_userInfo = filteredUserInfo

0 commit comments

Comments
 (0)