Skip to content
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

[SR-6935] Can't call Objective-C generic class method from protocol extension. #49483

Open
krzyzanowskim opened this issue Feb 6, 2018 · 0 comments

Comments

@krzyzanowskim
Copy link
Contributor

krzyzanowskim commented Feb 6, 2018

Previous ID SR-6935
Radar None
Original Reporter @krzyzanowskim
Type Bug

Attachment: Download

Environment

Xcode 9.2, Swift 4.0.3

Additional Detail from JIRA
Votes 0
Component/s CodeCompletion, Compiler
Labels Bug
Assignee None
Priority Medium

md5: 740486f48fd304f2b204d450e147db01

Issue Description:

I can't explain what is going on, but I can't call the method that is autocompleted, and definitely exists.

protocol _PSPDFKVOController: class {}
extension _PSPDFKVOController {
    func observe2<Value>(_ object: AnyObject, keyPath: KeyPath<Self, Value>, options: NSKeyValueObservingOptions = [], block: @escaping (NSKeyValueObservedChange<Value>) -> Void) -> NSKeyValueObservation? {
        let controller = self as! PSPDFKVOController<Value>
        controller.observe(controller, "", options: options) { (a, b, c) in // Error: Extra argument in call
            // WAT?
        }
}

PSPDFKVOController is an Objective-C generic class

See attached video to see what's going on.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant