Skip to content

Commit a0f8b48

Browse files
authored
Merge pull request swiftlang#37096 from DougGregor/async-detached-implicit-self-capture
2 parents 2327f10 + 2000bf9 commit a0f8b48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ public func detach<T>(
442442
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
443443
public func asyncDetached<T>(
444444
priority: Task.Priority = .unspecified,
445-
operation: __owned @Sendable @escaping () async -> T
445+
@_implicitSelfCapture operation: __owned @Sendable @escaping () async -> T
446446
) -> Task.Handle<T, Never> {
447447
return detach(priority: priority, operation: operation)
448448
}
@@ -452,7 +452,7 @@ public func asyncDetached<T>(
452452
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
453453
public func asyncDetached<T>(
454454
priority: Task.Priority = .unspecified,
455-
operation: __owned @Sendable @escaping () async throws -> T
455+
@_implicitSelfCapture operation: __owned @Sendable @escaping () async throws -> T
456456
) -> Task.Handle<T, Error> {
457457
return detach(priority: priority, operation: operation)
458458
}

0 commit comments

Comments
 (0)