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-11668] Offer a better diagnostic when an attribute conflicts with another declaration #54077

Closed
CodaFi opened this issue Oct 25, 2019 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation

Comments

@CodaFi
Copy link
Member

CodaFi commented Oct 25, 2019

Previous ID SR-11668
Radar None
Original Reporter @CodaFi
Type Bug
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI
Assignee @DougGregor
Priority Medium

md5: 0384761cabf2574614c2a9d9de7ad3d3

Issue Description:

Try to build this today:

import SwiftUI

protocol Stateful {
  associatedtype State
  func foo() -> State
}

struct Foo: Stateful {
  func foo() -> Int {}
  @State var bar: Int = 0 // Unknown attribute 'State'
}
@LucianoPAlmeida
Copy link
Collaborator

CodaFi (JIRA User) This seems fixed in XCode 11.4.1, the message I've seen is "Ignoring associated type 'State' in favor of module-scoped property wrapper 'State'; please qualify the reference with 'SwiftUI'" Can you verify? 🙂

@CodaFi
Copy link
Member Author

CodaFi commented Apr 26, 2020

Doug got this in rdar://problem/56213175

@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 diagnostics QoI Bug: Diagnostics Quality of Implementation
Projects
None yet
Development

No branches or pull requests

2 participants