mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
21 lines
441 B
Swift
21 lines
441 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
class P {}
|
|
class A : P {
|
|
func foo() throws {}
|
|
}
|
|
|
|
class B : P {
|
|
func foo() throws {}
|
|
}
|
|
|
|
typealias C = (P) throws -> Void
|
|
typealias E = (c: P.Type, arr: [(String, C)])
|
|
|
|
func foo<T: P>(_: [(String, (T) -> () throws -> Void)]) -> E { fatalError() }
|
|
func foo<T: P>(_: [(String, (T) -> () -> Void)]) -> E { fatalError() }
|
|
|
|
var arr = [E]()
|
|
arr.append(foo([("a", A.foo)]))
|
|
arr.append(foo([("b", B.foo)]))
|