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

Confusing diagnostic about protocol type not conforming to protocol

    XMLWordPrintable

    Details

      Description

      For example, one might see an error like:

      > Value of protocol type 'Cancellable' cannot conform to 'Cancellable'; only struct/enum/class types can conform to protocols

      Hamish has written a great answer here: https://stackoverflow.com/a/43408193 .

      1. We should make this diagnostic clearer (perhaps special casing when the two protocols are related), as it may not be obvious to the reader why this is not the case.
      2. We should probably have an educational note for this.

        Attachments

          Activity

            People

            Assignee:
            onyekachi Onyekachi Ezeoke
            Reporter:
            theindigamer Varun Gandhi
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated: