Here is my code
func testFuncA<T>(_ value: T) {
if let rValue = value as? Encodable {
testFuncB(rValue)//error in here: Cannot invoke 'testFuncB' with an argument list of type '(Encodable)'
}
}
func testFuncB<T: Encodable>(_ value: T) {
}
why can not invoketestFuncB
? is T
can cast to T: Encodable
?