Conversation
The type holds nothing but a @sendable closure, and the base it erases is itself Sendable, but without the conformance an erased sequence can neither leave an actor nor be merged with another and erased again under the Swift 6 language mode. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T8cahEd4GfsHQ89sNrmP4p
lhoward
marked this pull request as ready for review
October 3, 2026 22:34
Contributor
|
Closing because this conformance is already present on current The existing conformance is compiler-checked and unconditional, so the additional conditional |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
AnyAsyncSequencestores nothing but a@Sendableclosure, andinit(_:)already requires the erased base to beSendable, so the type is safe to send whenever its elements are. Without a declared conformance, consumers compiling in the Swift 6 language mode cannot return an erased sequence from an actor, store one in aSendabletype, or merge erased sequences and erase the result again; each is diagnosed as sending a non-Sendablevalue. This adds@uncheckedbecause the compiler cannot see through the closure; the closure's own@Sendablerequirement is what makes it sound.AnyAsyncIteratoris left alone: it holds a mutable base and is not meant to be shared.Tests
No behaviour change. On this machine (Linux, Swift 6.4) the package only compiles with #70 applied, so I confirmed the change builds and the suite passes on top of #70 and #71 (199 tests, 0 failures); on its own it is a four-line source change with no dependencies on either.
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01T8cahEd4GfsHQ89sNrmP4p