[SR-238] Support throwing subscripts #42860
Labels
compiler
The Swift compiler in itself
declarations
Feature: declarations
error handling
feature
A feature request or implementation
improvement
subscript
Feature: Subscript declarations
swift evolution implemented
Flag → feature: A feature that was approved through the Swift evolution process and implemented
throws & rethrows
Feature → error handling: throws & rethrows
Additional Detail from JIRA
md5: d1f830bfd05395ee30fb2819cb12b391
relates to:
Issue Description:
Support for throwing subscripts would together with generic ones be really nice for JSON mapping/deserializing libraries like mine https://github.com/Anviking/Decodable. It would make subscripts an alternative to custom operators.
For example:
subscript<T: SomeProtocol>(key: String) throws -> T
Would most likely be useful on its own for a lot of other things as well.
The text was updated successfully, but these errors were encountered: