Skip to content

Commit e69a59b

Browse files
authored
Merge pull request #81925 from slavapestov/test-rdar151466803
Add regression test for fixed crasher
2 parents 47e5ede + dc813a0 commit e69a59b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// RUN: not %target-swift-frontend -typecheck
2+
3+
enum E: Error, Equatable {
4+
case error1
5+
}
6+
7+
public struct S {}
8+
9+
public struct S2: AsyncSequence {
10+
public typealias Element = S
11+
public init() {}
12+
public func makeAsyncIterator() -> AsyncIterator { return AsyncIterator() }
13+
public struct AsyncIterator: AsyncIteratorProtocol {
14+
public func next() async throws -> S? {
15+
return nil
16+
}
17+
}
18+
}
19+
20+
public struct S3: Sendable {
21+
public func f() async throws -> AsyncSequence<S, E> {
22+
return S2()
23+
}
24+
}
25+

0 commit comments

Comments
 (0)