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

Crash When Calling Curried Instance Method on Protocol

    XMLWordPrintable

    Details

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

      Description

      protocol Fooable {}
      
      extension Fooable {
          func foo() -> String { return "Fooable Extension String" }
      }
      
      struct Bar: Fooable {}
      
      let baz:Fooable = Bar()
      
      Fooable.foo(baz)()
      

      This crashes when compiling on the final line.

      I've attached the logs that are generated when running it in a playground.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              rosslebeau Ross LeBeau
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: