generic type conforms to sequence with help of opaque type some iterator protocols are used

This happens because there’s no way in current Swift (5.2) to specify the associated type for an opaque return value. Thus, some IteratorProtocol is not enough for the compiler to figure out what kind of values should the next() method return.

This limitation of the language forces you to explicitly declare the iterator type if you want to actually use the sequence.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top