mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
values. Teach ActorIsolation that a `nil` isolated argument is statically nonisolated, and a reference to GlobalActor.shared statically has global actor isolation. This change also models arbitrary actor instance isolation using VarDecls when possible, which allows comparing two ActorIsolation values that may represent different actor instances. Previously, ActorIsolation was modeled only by storing the nominal actor type and the parameter index, so the actor isolation value for two different actors was considered to be equal. Now, the nominal actor type is only used for isolated `self` in cases where there is no implicit self parameter decl, such as for stored properties.
11 KiB
11 KiB