Files
swift-mirror/test/Interpreter/Inputs/resilient_async2.swift
Arnold Schwaighofer 24925db1f5 Use a async function pointer for default async protocol witness implemenations
Protocol witness table entries of async functions need to be async
function pointers.

rdar://77474699
2021-05-21 13:50:10 -07:00

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()
}