Skip to content

Concurrency: Declare explicit Failure typealiases on AsyncSequence iterators #72645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions stdlib/public/Concurrency/AsyncCompactMapSequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ extension AsyncCompactMapSequence: AsyncSequence {
public struct Iterator: AsyncIteratorProtocol {
public typealias Element = ElementOfResult

// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure

@usableFromInline
var baseIterator: Base.AsyncIterator

Expand Down
4 changes: 4 additions & 0 deletions stdlib/public/Concurrency/AsyncDropFirstSequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ extension AsyncDropFirstSequence: AsyncSequence {

/// The iterator that produces elements of the drop-first sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure

@usableFromInline
var baseIterator: Base.AsyncIterator

Expand Down
4 changes: 4 additions & 0 deletions stdlib/public/Concurrency/AsyncDropWhileSequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ extension AsyncDropWhileSequence: AsyncSequence {

/// The iterator that produces elements of the drop-while sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure

@usableFromInline
var baseIterator: Base.AsyncIterator

Expand Down
4 changes: 4 additions & 0 deletions stdlib/public/Concurrency/AsyncFilterSequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ extension AsyncFilterSequence: AsyncSequence {

/// The iterator that produces elements of the filter sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure

@usableFromInline
var baseIterator: Base.AsyncIterator

Expand Down
4 changes: 4 additions & 0 deletions stdlib/public/Concurrency/AsyncFlatMapSequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ extension AsyncFlatMapSequence: AsyncSequence {

/// The iterator that produces elements of the flat map sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure

@usableFromInline
var baseIterator: Base.AsyncIterator

Expand Down
4 changes: 4 additions & 0 deletions stdlib/public/Concurrency/AsyncMapSequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ extension AsyncMapSequence: AsyncSequence {

/// The iterator that produces elements of the map sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure

@usableFromInline
var baseIterator: Base.AsyncIterator

Expand Down
4 changes: 4 additions & 0 deletions stdlib/public/Concurrency/AsyncPrefixSequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ extension AsyncPrefixSequence: AsyncSequence {

/// The iterator that produces elements of the prefix sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure

@usableFromInline
var baseIterator: Base.AsyncIterator

Expand Down
4 changes: 4 additions & 0 deletions stdlib/public/Concurrency/AsyncPrefixWhileSequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ extension AsyncPrefixWhileSequence: AsyncSequence {

/// The iterator that produces elements of the prefix-while sequence.
public struct Iterator: AsyncIteratorProtocol {
// FIXME: Remove when $AssociatedTypeImplements is no longer needed
@available(SwiftStdlib 6.0, *)
public typealias Failure = Base.Failure

@usableFromInline
var predicateHasFailed = false

Expand Down