Skip to content

Commit 1436f61

Browse files
committed
CFError: fix compile warning
`CFError` conforms to `Error` and contains a `public var _userInfo`. In swiftlang/swift@77a3609 the type of this var was changed from `Any?` to `AnyObject?` but this change was not made in SCLF too. Consequently there is currently a compiler warning: > Var '_userInfo' nearly matches defaulted requirement '_userInfo' of > protocol 'Error' Fix this warning by adjusting the type of the `_userInfo` var.
1 parent bafd8c2 commit 1436f61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/NSError.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ extension CFError : Error {
395395
return CFErrorGetCode(self)
396396
}
397397

398-
public var _userInfo: Any? {
399-
return CFErrorCopyUserInfo(self) as Any
398+
public var _userInfo: AnyObject? {
399+
return CFErrorCopyUserInfo(self) as AnyObject
400400
}
401401
}
402402

0 commit comments

Comments
 (0)