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-7151] Generalize CaseIterable Synthesis for Availability #49699

Open
CodaFi opened this issue Mar 9, 2018 · 3 comments
Open

[SR-7151] Generalize CaseIterable Synthesis for Availability #49699

CodaFi opened this issue Mar 9, 2018 · 3 comments
Labels
compiler The Swift compiler in itself derived conformances Feature → protocol → conformances: derived conformances aka synthesized conformances feature A feature request or implementation good first issue Good for newcomers improvement

Comments

@CodaFi
Copy link
Member

CodaFi commented Mar 9, 2018

Previous ID SR-7151
Radar rdar://problem/43569215
Original Reporter @CodaFi
Type Improvement
Status In Progress
Resolution
Additional Detail from JIRA
Votes 2
Component/s Compiler
Labels Improvement, StarterBug
Assignee None
Priority Medium

md5: 508eab090d1f0026b4428b290a2d40be

relates to:

  • SR-9094 Unavailable enum case with synthesized raw value causes error

Issue Description:

As of this issue, the current implementation of SE-0194 does not synthesize a conformance if any cases contain an availability attribute. This restriction may be lifted at any time by an implementation that maintains the source-order invariant.

enum Rhapsody: CaseIterable {
  @available(*, unavailable)
  case inBlue 
  case hungarian, bohemian
  @available(*, deprecated)
  case onATheme
}
Rhapsody.allCases // [hungarian, bohemian, onATheme] 
@tkremenek
Copy link
Member

@swift-ci create

@swift-ci
Copy link
Collaborator

Comment by Owen Voorhees (JIRA)

Tagging a bug I found while implementing this which will impact most use cases: SR-9094

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@NKorotkov
Copy link

Any news on this issue? Swift 5.7, still a problem.

@AnthonyLatsis AnthonyLatsis added derived conformances Feature → protocol → conformances: derived conformances aka synthesized conformances feature A feature request or implementation labels Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself derived conformances Feature → protocol → conformances: derived conformances aka synthesized conformances feature A feature request or implementation good first issue Good for newcomers improvement
Projects
None yet
Development

No branches or pull requests

5 participants