-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
compilerThe Swift compiler itselfThe Swift compiler itselffeatureA feature request or implementationA feature request or implementationimprovement
Description
| Previous ID | SR-115 |
| Radar | rdar://problem/21461357 |
| Original Reporter | radex (JIRA User) |
| Type | Improvement |
| Status | Resolved |
| Resolution | Done |
Additional Detail from JIRA
| Votes | 11 |
| Component/s | Compiler |
| Labels | Improvement, LanguageFeatureRequest |
| Assignee | @slavapestov |
| Priority | Medium |
md5: ea5cb771b99703784bb1dd3c9e7cf4ed
blocks:
- SR-3460 Replace _AnyHashable protocol with a generic subscript
relates to:
- SR-238 Support throwing subscripts
Issue Description:
It would really help me and my library (https://github.com/radex/swiftyuserdefaults) to be able to use generic constraints on subscripts, e.g.
subscript<T: SomeProtocol>(key: DefaultsKey<T>) -> T { ... }
@lattner already indicated on the mailing list that this is considered a current language limitation, not a design choice, so I thought it might be useful to have a JIRA issue for tracking progress on this.
Metadata
Metadata
Assignees
Labels
compilerThe Swift compiler itselfThe Swift compiler itselffeatureA feature request or implementationA feature request or implementationimprovement