Skip to content

Commit 46c9de8

Browse files
committed
[Concurrency] Work around issue with old compilers and newer _Concurrency lib
Fixes rdar://75996690.
1 parent 669a49a commit 46c9de8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,9 @@ internal func _runTaskForBridgedAsyncMethod(_ body: @escaping () async -> Void)
667667
// if we're already running on behalf of a task,
668668
// if the receiver of the method invocation is itself an Actor, or in other
669669
// situations.
670+
#if compiler(>=5.5) && $Sendable
670671
Task.runDetached { await body() }
672+
#endif
671673
}
672674

673675
#endif

0 commit comments

Comments
 (0)