【发布时间】:2016-01-10 07:24:20
【问题描述】:
有点像
protocol A {
var intCollection: CollectionType<Int> { get }
}
或
protocol A {
typealias T: CollectionType where T.Generator.Element == Int
var intCollection: T
}
在 Swift 2.1 中可能吗?
Swift 4 更新
Swift 4 现在支持此功能! read more in here
【问题讨论】:
-
这可能会回答你的问题:stackoverflow.com/questions/27725803/…