SR-55 non-@objc protocol existentials do not conform to their own protocol type
Issue Description:
When you make a generic that requires that the generic type inherit from AnyObject (be a class), it is not satisfied if you use a protocol that is constrained to only class type. Here is example code.
This is unfortunately somewhat correct behavior, since a protocol value has to carry both the class reference and a pointer to the information about how the class implements the protocol. See SR-55 and its dups for more details.
Environment
Xcode 9.4.1 production on Swift 4.1.
Additional Detail from JIRA
md5: 58c4e0a8cae1656677208c2eb3fd58f4
duplicates:
Issue Description:
When you make a generic that requires that the generic type inherit from AnyObject (be a class), it is not satisfied if you use a protocol that is constrained to only class type. Here is example code.
Expected🙁
This compiles
Actual:
The text was updated successfully, but these errors were encountered: