作为示例函数给出:
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
我想念什么吗?
看起来像这样
sample(String.self, to: Int.self)
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句