File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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 ()))
Original file line number Diff line number Diff line change 33
44@available ( SwiftStdlib 5 . 1 , * )
55func 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}
You can’t perform that action at this time.
0 commit comments