Skip to content

Commit fca9747

Browse files
authored
Merge pull request #71011 from DougGregor/isolation-any-actor
Switch #isolation from AnyActor to Actor
2 parents 50aaad3 + 8d67a37 commit fca9747

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,11 @@ public func _defaultActorDestroy(_ actor: AnyObject)
7373
@usableFromInline
7474
internal func _enqueueOnMain(_ job: UnownedJob)
7575

76+
#if $Macros
7677
/// Produce a reference to the actor to which the enclosing code is
7778
/// isolated, or `nil` if the code is nonisolated.
7879
@available(SwiftStdlib 5.1, *)
7980
@freestanding(expression)
80-
public macro isolation() -> (any AnyActor)? = Builtin.IsolationMacro
81+
public macro isolation() -> (any Actor)? = Builtin.IsolationMacro
82+
#endif
83+

0 commit comments

Comments
 (0)