Skip to content

Commit 5819c31

Browse files
authored
Merge pull request swiftlang#75568 from tshortli/next-isolation-availability
NFC: Update stale references to `next(_:)`
2 parents d59a5c1 + 4224479 commit 5819c31

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

lib/AST/ASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ struct ASTContext::Implementation {
325325
/// The declaration of 'AsyncIteratorProtocol.next()'.
326326
FuncDecl *AsyncIteratorNext = nullptr;
327327

328-
/// The declaration of 'AsyncIteratorProtocol.next(_:)' that takes
328+
/// The declaration of 'AsyncIteratorProtocol.next(isolation:)' that takes
329329
/// an actor isolation.
330330
FuncDecl *AsyncIteratorNextIsolated = nullptr;
331331

lib/Sema/TypeCheckEffects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,7 @@ class ApplyClassifier {
13961396
isRethrowLikeTypedThrows(fnRef.getFunction())) {
13971397
// If we are in a rethrowing context and the function we're referring
13981398
// to is a rethrow-like function using typed throws or we are
1399-
// calling the next() or next(_:) of an async iterator,
1399+
// calling the next() or next(isolation:) of an async iterator,
14001400
// then look at all of the closure arguments.
14011401
LLVM_FALLTHROUGH;
14021402
} else {

lib/Sema/TypeCheckStmt.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3284,7 +3284,7 @@ FuncDecl *TypeChecker::getForEachIteratorNextFunction(
32843284
if (!isAsync)
32853285
return ctx.getIteratorNext();
32863286

3287-
// If AsyncIteratorProtocol.next(_:) isn't available at all,
3287+
// If AsyncIteratorProtocol.next(isolation:) isn't available at all,
32883288
// we're stuck using AsyncIteratorProtocol.next().
32893289
auto nextElement = ctx.getAsyncIteratorNextIsolated();
32903290
if (!nextElement)
@@ -3295,11 +3295,11 @@ FuncDecl *TypeChecker::getForEachIteratorNextFunction(
32953295
if (enclosingUnsafeInheritsExecutor(dc))
32963296
return ctx.getAsyncIteratorNext();
32973297

3298-
// If availability checking is disabled, use next(_:).
3298+
// If availability checking is disabled, use next(isolation:).
32993299
if (ctx.LangOpts.DisableAvailabilityChecking || loc.isInvalid())
33003300
return nextElement;
33013301

3302-
// We can only call next(_:) if we are in an availability context
3302+
// We can only call next(isolation:) if we are in an availability context
33033303
// that supports typed throws.
33043304
auto availability = overApproximateAvailabilityAtLocation(loc, dc);
33053305
if (availability.isContainedIn(ctx.getTypedThrowsAvailability()))

test/Concurrency/async_for_each_back_deploy.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
@available(SwiftStdlib 5.1, *)
55
func f<S: AsyncSequence>(s: S) async throws {
6-
// CHECK-NOT: next(_:)
6+
// CHECK-NOT: next(isolation:)
77
// CHECK: next()
88
for try await x in s { }
99
}

0 commit comments

Comments
 (0)