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-7327] Conditional conformance does not conform to inherited protocol #49875

Closed
swift-ci opened this issue Apr 2, 2018 · 2 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Apr 2, 2018

Previous ID SR-7327
Radar None
Original Reporter Ringo_D (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: a2cdd3d553083a09271ffbbfc2c017a6

is duplicated by:

  • SR-6474 Conditional conformance to refined protocol inappropriately fails

Issue Description:

protocol P {
    func test()
}

protocol P2: P {
}

extension Int : P {
    func test() {
    }
}

extension Array : P2 where Element : P {
    func test() {
    }
}

The compiler said “Type Array<Element> does not conform to protocol P.”

But you can see that `Array` conforms to `P2` which is inherited by `P`

It will be fine if I change `extension Array : P2` to `extension Array: P`.

@belkadan
Copy link
Contributor

belkadan commented Apr 3, 2018

@huonw, this is by design right? Or at least a known issue?

@huonw
Copy link
Mannequin

huonw mannequin commented Apr 3, 2018

This will be by design once #15268 lands, see apple/swift-evolution#809

@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