Skip to content

Commit a7914bb

Browse files
committed
Concurrency: Fix a condfail in default AsyncIteratorProtocol.next().
Older compilers that do not enable `OptionalIsolatedParameters` by default must be able to build the `_Concurrency` module. Resolves rdar://126215750
1 parent e871ae4 commit a7914bb

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)