Async overloading in protocol implementation fails

Originator:patskovn
Number:rdar://FB9595388 Date Originated:3/9/2021
Status:Open Resolved:
Product:Swift Compiler Product Version:Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)
Classification: Reproducible:yes
 
Amendment https://github.com/apple/swift-evolution/pull/1392 is incomplete.
Compilation fails, when class trying to satisfy protocol requirement with both sync and async method or just async method implementation.

```swift
protocol TestProtocol {
    func read() // Compilation also fails if TestProtocol contains only async version
    func read() async
}

// Note: everything compiles and resolves correctly when TestClass does not implement TestProtocol 
class TestClass: TestProtocol {
    func read() {}
    func read() async {}
}
```

Throws several issues:
error: type 'TestClass' does not conform to protocol 'TestProtocol'
note: multiple matching functions named 'read()' with type '() async -> ()'

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!