Skip to content

Commit 8d67a37

Browse files
committed
Only declare isolation macro when the compiler supports macros
1 parent 24c2d1a commit 8d67a37

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stdlib/public/Concurrency/Actor.swift

Lines changed: 3 additions & 0 deletions
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)
8081
public macro isolation() -> (any Actor)? = Builtin.IsolationMacro
82+
#endif
83+

0 commit comments

Comments
 (0)