Files
swift-mirror/test/Concurrency/async_sequence_existential.swift
Allan Shortlidge 2e0da39fdd Tests: Use -o instead of stdout redirect in async_sequence_existential.swift.
This will hopefully prevent random line breaks from being inserted into the
`-dump-ast` output and interfering with FileCheck's matching.

Resolves rdar://148855879.
2025-04-09 10:24:36 -07:00

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