[Swift 5.9] Using shorthand syntax to reference @MainActor isolated method from non isolated context raises error #68117
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
Accessing the init method of a @mainactor isolated object to store as a closure raises an isolation error since Swift 5.9.
Steps to reproduce
Expected behavior
I would expect the last line to compile successfully as it used to prior to Swift 5.9
Environment
swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.106 clang-1500.0.40.1)
Target: arm64-apple-macosx13.0
Xcode 15.0
Build version 15A5229h
iOS 15.0
The text was updated successfully, but these errors were encountered: