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

Passing a parameter of type protocol P to a generic method with a protocol P constraint fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Duplicate
    • Component/s: Compiler
    • Labels:
      None
    • Environment:

      OS X 10.11.5 Beta 2

      Description

      Per the attached Swift file, line 21 will result in a compiler error attempting to call testP with a parameter of type protocol P. Naturally the parameter conforms to P. I tested against 0425 SNAPSHOT and it did not pass.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              stuartcarnie Stuart Carnie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: