> Note that, if we do the above, I’d love to make it an error to define a new
> associated type with the same name as an associated type in an inherited
> protocol. It’s odd that we do so, and IIRC the only use case for it is to add
> requirement to an “existing” associated type.
You also do it to specify or change a default associated type. This is from an
older copy of the stdlib source code, but I believe there's still something
equivalent:
public protocol CollectionType : Indexable, SequenceType {
associatedtype Generator: GeneratorType = IndexingGenerator<Self>
--
Brent Royal-Gordon
Architechies
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution