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-10944] «weak» prevents Equatable synthesis #53335

Closed
AnthonyLatsis opened this issue Jun 16, 2019 · 3 comments
Closed

[SR-10944] «weak» prevents Equatable synthesis #53335

AnthonyLatsis opened this issue Jun 16, 2019 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@AnthonyLatsis
Copy link
Collaborator

Previous ID SR-10944
Radar None
Original Reporter @AnthonyLatsis
Type Bug
Status Resolved
Resolution Done
Environment

Xcode 10.2.1 (10E1001)

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

md5: 1106e196ec8997a139a761c74e551cfb

Issue Description:

class EquatableClass: Equatable {
    static func == (lhs: EquatableClass, rhs: EquatableClass) -> Bool {
        return true
    }
}

struct Foo: Equatable { // Type 'Foo' does not conform to protocol 'Equatable'
    weak var foo: EquatableClass?
}
@swift-ci
Copy link
Collaborator

Comment by Owen Voorhees (JIRA)

This may be fixed on master, your example compiles for me using commit 1a23a75

@belkadan
Copy link
Contributor

Yep, fixed by @theblixguy in Swift 5.1! #22143

@AnthonyLatsis
Copy link
Collaborator Author

Great! Thanks, Suyash.

@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

3 participants