mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add a test where the same type is both and async sequence and its iterator
This commit is contained in:
@@ -55,3 +55,16 @@ public struct OtherSequenceAdapter<Base: AsyncSequence>: AsyncSequence {
|
||||
|
||||
// CHECK-NOT: public typealias Failure
|
||||
}
|
||||
|
||||
// CHECK: public struct MineOwnIterator
|
||||
@available(SwiftStdlib 5.1, *)
|
||||
public struct MineOwnIterator<Element>: AsyncSequence, AsyncIteratorProtocol {
|
||||
public mutating func next() async -> Element? { nil }
|
||||
public func makeAsyncIterator() -> Self { self }
|
||||
|
||||
// CHECK: @_implements(_Concurrency.AsyncIteratorProtocol, Failure)
|
||||
// CHECK-SAME: public typealias __AsyncIteratorProtocol_Failure = Swift.Never
|
||||
|
||||
// CHECK: @_implements(_Concurrency.AsyncSequence, Failure)
|
||||
// CHECK-SAME: public typealias __AsyncSequence_Failure = Swift.Never
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user