swiftlang/swift
GitHub で見る[SR-7151] Generalize CaseIterable Synthesis for Availability
Open
#49,699 opened on 2018年3月9日
compilerderived conformancesfeaturegood first issueimprovement
説明
| Previous ID | SR-7151 |
| Radar | rdar://problem/43569215 |
| Original Reporter | @CodaFi |
| Type | Improvement |
| Status | In Progress |
| Resolution |
| 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]