mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Previously, when looking up a protocol method, the witness table was always exepcted to be the final argument passed to the function. That is true for sync protocol witnesses but not for async witnesses. In the async case, the witness table is embedded in the async context. Here, the witness table is dug out of the async context. rdar://problem/71491604
14 lines
218 B
Swift
14 lines
218 B
Swift
import _Concurrency
|
|
|
|
public protocol Protokol {
|
|
func protocolinstanceVoidToVoid() async
|
|
}
|
|
|
|
public struct Impl : Protokol {
|
|
public init() {}
|
|
public func protocolinstanceVoidToVoid() async {
|
|
print(self)
|
|
}
|
|
}
|
|
|