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

Subclasses do not inherit protocol conformance from superclasses as of Xcode 7.3.1

    XMLWordPrintable

    Details

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

      Xcode Version 7.3.1 (7D1014)

      Description

      The following code worked in Xcode 7.3 and still works in a 7.3.1 playground, but no longer works in a 7.3.1 project file:

      protocol Foo {
      }
      
      extension Foo {
          func bar() -> Self { return self }
      }
      
      extension NSObject: Foo {}
      
      let view = UIView().bar() // Value of type `UIView` has no member `bar`
      

        Attachments

          Activity

            People

            Assignee:
            irace Bryan Irace
            Reporter:
            irace Bryan Irace
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: