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
The above will complain that Type 'Self.T' does not conform to protocol 'Collection'.
Changing it to associatedtype T: Collection yields a different error: Type 'Self.T.Iterator.Element' does not conform to protocol 'Equatable'.
Changing it to associatedtype T: Collection where T.Iterator.Element: Equatable, T.IndexDistance == Int yields the error 'where' clause cannot be attached to an associated type declaration, which appears to be the subject of SE-0142.
Any ideas?
The text was updated successfully, but these errors were encountered:
pepasflo
changed the title
How to use Changeset in protocols?
How to use Changeset in protocols?
Mar 17, 2017
Thanks for poking this ticket! I don't have Swift 4 installed yet, but I can check back in when I do. In the mean time, if someone else can confirm, that would be great!
I can't figure out how to make the compiler happy when trying to express something like this:
The above will complain that Type 'Self.T' does not conform to protocol 'Collection'.
Changing it to
associatedtype T: Collection
yields a different error: Type 'Self.T.Iterator.Element' does not conform to protocol 'Equatable'.Changing it to
associatedtype T: Collection where T.Iterator.Element: Equatable, T.IndexDistance == Int
yields the error 'where' clause cannot be attached to an associated type declaration, which appears to be the subject of SE-0142.Any ideas?
The text was updated successfully, but these errors were encountered: