Why Task { } doesn't need explicit use of self?

Docs says

The intent behind requiring self. when capturing self in an escaping closure is to warn the developer about potential reference cycles. The closure passed to Task is executed immediately, and the only reference to self is what occurs in the body. Therefore, the explicit self. isn't communicating useful information and should not be required.

But next here is:

Note: The same applies to the closure passed to Task.detached and TaskGroup.addTask .

But detached Task closure is escaping
operation: @escaping @Sendable () async -> Success

I think the documentation in the footnote is outdated

1 Like