作为样本函数给出:
func sample<Z: Equatable, X: IntegerType>(from: Z.Type, to: X.Type) {
print("HELLO")
}
sample(String, to: Int)
我收到以下错误Missing argument for parameter 'to' in call
我错过了什么吗?
答案 0 :(得分:2)
看起来这样可行
sample(String.self, to: Int.self)