Files
swift-mirror/test/stmt/errors_async.swift
Karoy Lorentey 47956908b7 [Concurrency] SwiftStdlib 5.5 ⟹ SwiftStdlib 5.1 (usages)
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.
2021-10-28 14:36:36 -07:00

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)
}
}