Skip to content

Commit 24c2d1a

Browse files
committed
Switch #isolation from AnyActor to Actor
We are currently lacking the ability to describe "normal or distributed actor" with a single protocol in a manner that allows hopping to it, because `AnyActor` is a marker protocol. Use `Actor` while we sort this out.
1 parent f709192 commit 24c2d1a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Sema/CSGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3916,7 +3916,7 @@ namespace {
39163916

39173917
Type visitCurrentContextIsolationExpr(CurrentContextIsolationExpr *E) {
39183918
auto actorProto = CS.getASTContext().getProtocol(
3919-
KnownProtocolKind::AnyActor);
3919+
KnownProtocolKind::Actor);
39203920
return OptionalType::get(actorProto->getDeclaredExistentialType());
39213921
}
39223922

stdlib/public/Concurrency/Actor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ internal func _enqueueOnMain(_ job: UnownedJob)
7777
/// isolated, or `nil` if the code is nonisolated.
7878
@available(SwiftStdlib 5.1, *)
7979
@freestanding(expression)
80-
public macro isolation() -> (any AnyActor)? = Builtin.IsolationMacro
80+
public macro isolation() -> (any Actor)? = Builtin.IsolationMacro

0 commit comments

Comments
 (0)