mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This will hopefully prevent random line breaks from being inserted into the `-dump-ast` output and interfering with FileCheck's matching. Resolves rdar://148855879.
23 lines
565 B
Swift
23 lines
565 B
Swift
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify
|
|
|
|
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -primary-file %s -dump-ast -o %t.ast.txt
|
|
// RUN: %FileCheck %s < %t.ast.txt
|
|
|
|
// REQUIRES: concurrency
|
|
|
|
// https://github.com/swiftlang/swift/issues/80582
|
|
// UNSUPPORTED: OS=windows-msvc
|
|
|
|
extension Error {
|
|
func printMe() { }
|
|
}
|
|
|
|
func test(seq: any AsyncSequence) async {
|
|
// CHECK: "error" interface_type="any Error"
|
|
do {
|
|
for try await _ in seq { }
|
|
} catch {
|
|
error.printMe()
|
|
}
|
|
}
|