Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Sema/CSGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3916,7 +3916,7 @@ namespace {

Type visitCurrentContextIsolationExpr(CurrentContextIsolationExpr *E) {
auto actorProto = CS.getASTContext().getProtocol(
KnownProtocolKind::AnyActor);
KnownProtocolKind::Actor);
return OptionalType::get(actorProto->getDeclaredExistentialType());
}

Expand Down
5 changes: 4 additions & 1 deletion stdlib/public/Concurrency/Actor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ public func _defaultActorDestroy(_ actor: AnyObject)
@usableFromInline
internal func _enqueueOnMain(_ job: UnownedJob)

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