mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
15 lines
315 B
Swift
15 lines
315 B
Swift
// RUN: %target-swift-frontend %s -emit-ir -enable-experimental-concurrency
|
|
// REQUIRES: concurrency
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
protocol P {
|
|
func f<T>() async throws -> T?
|
|
}
|
|
@available(SwiftStdlib 5.1, *)
|
|
extension P {
|
|
func f<T>() async throws -> T? { nil }
|
|
}
|
|
@available(SwiftStdlib 5.1, *)
|
|
class X: P {}
|
|
|