Cannot conform to Swift protocol with similar generic function signatures

Number:rdar://23226135 Date Originated:22-Oct-2015 03:07 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Swift 2.1
Classification:Other Bug Reproducible:Always

When you create a Swift protocol with similar function signatures, it
can become impossibly to conform to the protocol according to the

Steps to reproduce:

1. Create a protocol with generic functions of the same signature
2. Make one function with type constraint `T` and another with `T: RawRepresentable`
3. Attempt to create a struct that conforms to the protocol


1. Run `swiftc GenericProtocolError.swift`

Expected results:

Swift should happily compile the example with no problem!

Actual results:

The compiler errors with "type does not conform to protocol"


- See error.log for the error and note output
- The note makes it sound like the functions are interpreted as the same
  signature regardless of the difference in `T`
- Removing the protocol and just having the functions on the struct
  works fine.


By keithbsmiley at Oct. 22, 2015, 10:08 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!