Skip to content

Commit 70bb344

Browse files
committed
[concurrency] Make extension have the same availability as its only containing declaration.
Otherwise in certain cases, we will run into: 1588 | extension GlobalActor { | | `- error: 'GlobalActor' is only available in macOS 10.15 or newer | `- note: add @available attribute to enclosing extension 1589 | @available(SwiftStdlib 6.2, *) 1590 | @_silgen_name("_swift_task_isCurrentGlobalActor") rdar://146848568
1 parent b4a2908 commit 70bb344

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,6 +1545,7 @@ func _taskIsCurrentExecutor(_ executor: Builtin.Executor) -> Bool
15451545
internal func _taskIsCurrentExecutor(
15461546
executor: Builtin.Executor, flags: UInt64) -> Bool
15471547

1548+
@available(SwiftStdlib 6.2, *)
15481549
extension GlobalActor {
15491550
@available(SwiftStdlib 6.2, *)
15501551
@_silgen_name("_swift_task_isCurrentGlobalActor")

0 commit comments

Comments
 (0)