You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Foundation/NSError.swift
+6-6
Original file line number
Diff line number
Diff line change
@@ -59,9 +59,9 @@ open class NSError : NSObject, NSCopying, NSSecureCoding, NSCoding {
59
59
iflet info = aDecoder.decodeObjectOfClasses([NSSet.self,NSDictionary.self,NSArray.self,NSString.self,NSNumber.self,NSData.self,NSURL.self], forKey:"NSUserInfo")as?NSDictionary{
60
60
varfilteredUserInfo=[String : Any]()
61
61
// user info must be filtered so that the keys are all strings
62
-
info.enumerateKeysAndObjects([]){ key, object, _ in
63
-
iflet key =keyas?NSString{
64
-
filteredUserInfo[key._swiftObject]=object
62
+
info.enumerateKeysAndObjects([]){
63
+
iflet key =$0.0as?NSString{
64
+
filteredUserInfo[key._swiftObject]=$0.1
65
65
}
66
66
}
67
67
_userInfo = filteredUserInfo
@@ -74,9 +74,9 @@ open class NSError : NSObject, NSCopying, NSSecureCoding, NSCoding {
74
74
iflet info = aDecoder.decodeObject()as?NSDictionary{
75
75
varfilteredUserInfo=[String : Any]()
76
76
// user info must be filtered so that the keys are all strings
77
-
info.enumerateKeysAndObjects([]){ key, object, _ in
0 commit comments