-
Notifications
You must be signed in to change notification settings - Fork 1.1k
RecoverableError's resultHandler needs @escaping #1539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RecoverableError's resultHandler needs @escaping #1539
Conversation
@swift-ci Please test |
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
@itaiferber: |
Foundation/NSError.swift
Outdated
@@ -147,7 +147,7 @@ open class NSError : NSObject, NSCopying, NSSecureCoding, NSCoding { | |||
internal typealias UserInfoProvider = (_ error: Error, _ key: String) -> Any? | |||
internal static var userInfoProviders = [String: UserInfoProvider]() | |||
|
|||
open class func setUserInfoValueProvider(forDomain errorDomain: String, provider: (/* @escaping */ (Error, String) -> Any?)?) { | |||
open class func setUserInfoValueProvider(forDomain errorDomain: String, provider: (@escaping (Error, String) -> Any?)?) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must drop the @escaping
before it can build. Optional where X is a closure type is always implicitly escaping.
d9dc66f
to
098997a
Compare
@millenomi Thanks — hadn't had the time to fix this up. I dropped that commit, though I wonder if changing What do you think? |
We have that pattern nowhere, and I'm not sure it adds anything. |
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
@ikesyo Thanks! Completely forgot about this. |
What's in this pull request?
Resolves SR-4405/rdar://problem/36911792 by adding
@escaping
toresultHandler
.[This mirrors swiftlang/swift#16182]