mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Protocol witness table entries of async functions need to be async function pointers. rdar://77474699
14 lines
250 B
Swift
14 lines
250 B
Swift
public protocol Problem : class {
|
|
func theProblem() async -> Int
|
|
}
|
|
|
|
public extension Problem {
|
|
func theProblem() async -> Int {
|
|
return 1
|
|
}
|
|
}
|
|
|
|
public func callGenericWitness<T: Problem> (_ t: T) async -> Int {
|
|
return await t.theProblem()
|
|
}
|