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-1527] cannot implement QLPreviewControllerDataSource #44136

Closed
mattneub opened this issue May 15, 2016 · 3 comments
Closed

[SR-1527] cannot implement QLPreviewControllerDataSource #44136

mattneub opened this issue May 15, 2016 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@mattneub
Copy link

Previous ID SR-1527
Radar None
Original Reporter @mattneub
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

Toolchain: Swift Development Snapshot 2016-05-09 (a)

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

md5: 1a028d59934de3963412e16cc7932632

duplicates:

  • SR-1514 impossible to adopt WKScriptMessageHandler protocol

Issue Description:

This doesn't compile:

import UIKit
import QuickLook

class ViewController: UIViewController, QLPreviewControllerDataSource {
    func numberOfPreviewItems(in controller: QLPreviewController) -> Int {
        return 1
    }
    func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> QLPreviewItem {
        return NSURL()
    }
}

It should compile. The problem is that no implementation of the argument labels of `previewController(_:previewItemAt:)` satisfies the compiler.

@mattneub
Copy link
Author

Presumably related to SR-1526 and others that I've reported where a delegate protocol's requirements cannot be satisfied.

@belkadan
Copy link
Contributor

Consolidating; likely fixed in master.

@mattneub
Copy link
Author

mattneub commented Jun 4, 2016

Confirmed that this is fixed in the toolchain release of May 31.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants