Skip to content

Pattern that the region based isolation checker does not understand how to check #79435

Open
@v57

Description

@v57

Description

Just randomly found this error

Reproduction

@globalActor
public actor SomeActor: GlobalActor {
  public static let shared = SomeActor()
}

class IsolationError {
  @SomeActor
  func test() async { }
}

let error = IsolationError()
Task {
  await error.test()
}

Expected behavior

class is not sendable so maybe it should display a proper error message like:

Non-sendable type 'IsolationError' in implicitly asynchronous access to main actor-isolated let 'error' cannot cross actor boundary

Environment

swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx15.0

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.concurrencyFeature: umbrella label for concurrency language features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions