mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The concurrency runtime now deploys back to macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, which corresponds to the 5.1 release of the stdlib. Adjust macro usages accordingly.
16 lines
370 B
Swift
16 lines
370 B
Swift
// RUN: %target-swift-frontend -typecheck -verify %s
|
|
|
|
// REQUIRES: concurrency
|
|
|
|
enum MyError : Error {
|
|
case bad
|
|
}
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
func shouldThrow() async {
|
|
// expected-error@+1 {{errors thrown from here are not handled}}
|
|
let _: Int = try await withUnsafeThrowingContinuation { continuation in
|
|
continuation.resume(throwing: MyError.bad)
|
|
}
|
|
}
|