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

Implement support for SE-0095: Replace `protocol<P1, P2>` syntax with P1&P2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Component/s: Compiler
    • Labels:

      Description

      SE-0095 has been accepted, and we need an implementation. This consists of a few straight-forward pieces of work:

      • "Parse" the "P1 & P2" style syntax in the type production grammar.
      • Enhance PreCheckExpression to combine "P1 & P2" into a TypeExpr to cover the expression grammar case.
      • Make Any be a keyword, and make it generate the same AST as we form for protocol<> today.
      • Change the parser logic for the protocol<P1,P2> syntax to generate a warning+fixit for the new syntax.
      • Upgrade that warning to an error a couple of weeks later.

      I'd suggest keeping the AST representation exactly the same as we have now for simplicity.

        Attachments

          Activity

            People

            • Assignee:
              joewillsher Josef Willsher
              Reporter:
              clattner Chris Lattner
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: