Details
Description
protocol P {
subscript<T>(key: Key) -> T? where T: Foo { get } // fails here, before "where"
}
We are not sure in which version this feature was added. In grammar of Swift 3.0 there is no where-clause (while it does not mean it was not supported as this grammar is not always precise):
protocol-subscript-declaration → subscript-headsubscript-resultgetter-setter-keyword-block
Still in recent docs we see:
protocol-subscript-declaration → subscript-head subscript-result generic-where-clause opt getter-setter-keyword-block
Attachments
Issue Links
- relates to
-
SUPPORT-17623 Loading...