-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Verifier] ObjC protocols may have unavailable requirements #6862
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
[Verifier] ObjC protocols may have unavailable requirements #6862
Conversation
...which don't need to have witnesses. I can't seem to come up with a reduced test case for this one, but it does fix a verifier failure in the larger project that triggered this. rdar://problem/29744313
@slavapestov, @DougGregor, any ideas how to test this? Or any ideas why this reduced case passed the verifier? import Foundation
open class Test : NSObject, NSCoding {
public override init() { fatalError() }
public required init?(coder: NSCoder) { fatalError() }
open func encode(with coder: NSCoder) { fatalError() }
} import Lib
import Foundation
final class Sub: Test {} @swift-ci Please smoke test |
I guess that's also a review request, since we'll want to cherry-pick this to the 3.1 branch. |
Do non-objc protocols ever have unavailable requirements? |
I imagine we'll start wanting them for renaming purposes, but in that case I think we probably still require a witness; it'll just be a forwarding witness in an unconstrained protocol extension. |
…but currently they do not. |
Known failure in Foundation (dependent commits merged out of order). Will restart testing later. |
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.
LGTM!
@swift-ci Please smoke test Linux |
Oh, LGTM too |
…ng#6862) ...which don't need to have witnesses. I can't seem to come up with a reduced test case for this one, but it does fix a verifier failure in the larger project that triggered this. rdar://problem/29744313
...which don't need to have witnesses.
I can't seem to come up with a reduced test case for this one, but it does fix a verifier failure in the larger project that triggered this, where it complained about NSCoder's
encodeWithCoder(_:)
method (which was renamed toencode(with:)
in Swift 3).rdar://problem/29744313