func test1(user: String, completion: @escaping (TestModel) -> Void) {
test2(user: "test", completion: completion as! (Any) -> Void //failed here)
}
func test2(user: String, completion: @escaping (Any) -> Void) {
completion(user)
}
I want to pass test1's closure to test2, but test2's closure may have multiple type, it get error when run, EXC_BAD_INSTRUCTION
Is it passable to do this?