Uploaded image for project: 'Swift'
  1. Swift
  2. SR-115

Support generic constraints in subscripts

    XMLWordPrintable

    Details

      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

      { ... }

      Chris 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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                slavapestov Slava Pestov
                Reporter:
                radex Radek Pietruszewski
              • Votes:
                11 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: