[swift-evolution] protocol can only be used as a generic constraint because it has Self or associated type requirements
marc at knaup.koeln
Sun Dec 13 17:55:21 CST 2015
I'm looking at Swift 3.0's goal to improve generics.
Is there any info yet if and how we will be able to refer to instances of
protocols that have associated types?
What is the difficulty in supporting this?
var list = [Hashable]()
var hashable: Hashable = 2
Right now all we get is
> protocol 'Hashable' can only be used as a generic constraint because it
> has Self or associated type requirements
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution