Skip to content

NonisolatedNonsendingByDefault:migrate flags isolated(any) functions #85817

@mattmassicotte

Description

@mattmassicotte

Description

The following code is flagged by the migrate facility of NonisolatedNonsendingByDefault, but I do not think it should.

Reproduction

func useNonSendable() {
    acceptSending {
        print("doing a thing")
    }
}

func acceptSending(_ arg: sending @isolated(any) () async -> Void) {
}

Expected behavior

This function is not nonisolated and should not qualify for migration.

Environment

Apple Swift version 6.3-dev (LLVM 35f48306184cd25, Swift a69dbb3)
Target: arm64-apple-macosx26.0
Build config: +assertions

Additional information

No response

Metadata

Metadata

Assignees

Labels

actor isolationFeature → concurrency: Actor isolationcompilerThe Swift compiler itselfconcurrencyFeature: umbrella label for concurrency language featurestype checkerArea → compiler: Semantic analysisunexpected warningBug: Unexpected warning

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions