Skip to content

Global actor isolated methods safety hole. #80295

Open
@CrystDragon

Description

@CrystDragon

Description

I've posted a related feedback on the forum, please check this: https://forums.swift.org/t/a-concurrency-safety-hole-related-to-global-actor-isolated-methods/78803.

Reproduction

class A { 
  func a() async { 
    await b()  // <- ❗️❗️❗️ no compiler errors, not as expected
  }

  @MainActor 
  func b() async { }
}

Expected behavior

There should be diagnostics on the line await b(). We had it with compiler 5.10, but not any more nowadays (both with Swift 6.0 and nightly).

Environment

swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx14.0

Additional information

No response

Metadata

Metadata

Assignees

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