Daily iOS
SwiftUber

Generics and type erasure

You have an Iterator protocol with getNext() and hasNext(), and you want to change it from Int-only to generic with associatedtype Element. After the change, building an [Iterator] array no longer compiles. Why?

Submit