swift-book icon indicating copy to clipboard operation
swift-book copied to clipboard

Add discussion of global actor isolation inference. [SE-0316]

Open hborla opened this issue 6 months ago • 2 comments

This change adds documentation for isolation inference from class inheritance, overridden methods, and protocol conformances.

These rules are buried in old proposal documents, and they deserve documentation in TSPL, especially because they can be difficult to reason about. These rules were originally added in SE-0316.

This does not cover all cases of actor isolation inference; the rules for isolation inference of closures needs to be covered, but I think that belongs in the Sendable section because it's based on whether or not a closure type can be called from outside the current concurrency context.

I started an RFC thread on the forums about this change here: https://forums.swift.org/t/rfc-documentation-for-isolation-inference-from-classes-and-protocols-se-0316/80343.

Fixes: rdar://160642164

hborla avatar Jun 07 '25 16:06 hborla