// RUN: %target-typecheck-verify-swift // https://github.com/apple/swift/issues/50410 protocol Proto {} class Base {} class Test : Base, Proto {} struct A {} struct B {} func overloaded(_ f: () -> T, _ g: (T, A) -> ()) {} func overloaded(_ f: () -> T, _ g: (T, B) -> ()) {} func f() -> Test { return Test() } func g(_ t: T, _ a: A) -> () {} func test() { overloaded(f, g as (Test, A) -> ()) overloaded(f, g) }