Skip to content

Commit b6754aa

Browse files
authored
Merge pull request #72956 from tshortli/async-iterator-next-isolation-condfail
Concurrency: Fix a condfail in default `AsyncIteratorProtocol.next()`
2 parents 5ec1104 + a7914bb commit b6754aa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/public/Concurrency/AsyncIteratorProtocol.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ extension AsyncIteratorProtocol {
133133
@available(SwiftStdlib 6.0, *)
134134
@inlinable
135135
public mutating func next() async throws(Failure) -> Element? {
136+
#if $OptionalIsolatedParameters
136137
return try await next(isolation: nil)
138+
#else
139+
fatalError("unsupported compiler")
140+
#endif
137141
}
138142
}

0 commit comments

Comments
 (0)