Avatar
Avatar
Yuta Saito
@swift-5.6.3 -Xfrontend -parse-as-library protocol P { func foo() async } struct S: P { func foo() async { print("async version") } func foo() { print("sync version") } } func takeP<X: P>(_ x: X) async { await x.foo() } @main struct Entry { static func main() async { await takeP(S()) } } (edited)
sync version (edited)