You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A protocol value doesn't have the same representation as a class instance; it needs an extra pointer to carry around how the instance conforms to the protocol. So it's not compatible with the generic parameter here.
Additional Detail from JIRA
md5: 276e572a066726a6c8b6de639e3070f8
duplicates:
Issue Description:
I'm not sure if this is a bug or an expected behaviour, but for me this seems wrong.
I have a class with a generic type that needs to be an object. And I cannot use a protocol with an class type as type for this class.
With Xcode 10 Beta 6 I get following errors:
ClassType.playground:25:15: Cannot invoke initializer for type 'Holder<_>' with an argument list of type '(ObjectWithValue)'
ClassType.playground:27:15: 'Holder' requires that 'ObjectWithValue' be a class type
The text was updated successfully, but these errors were encountered: