Closed
Description
Description
Using some Actor
in a @globalActor
definition makes the compiler fail. The provided sample code compiles fine in previous Swift versions (Xcode 14.3.1, 15.0.0 Beta 1 to 4) but it does not compile in the latest compilers (Xcode 15 Beta 5 and 6).
Steps to reproduce
-
Add the following file in your project
@globalActor enum Serializer { static let shared: some Actor = AccessManager() } private actor AccessManager { // Custom functionality here }
-
Even without using
Serializer
anywhere, the compiler will fail with a nonzero exit code.
I have also left a project attached below as demonstration.
Expected behavior
Previous compiler were able to compile the file just fine. We were relying on that behavior at Raycast.
Environment
- Swift compiler:
swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.2 clang-1500.0.40.1)
- Xcode version:
Xcode 15.0.0 Beta 6
(also happens in Beta 5) - Deployment target:
arm64-apple-macosx14.0
Sample Project
SomeActor.zip