Sendability of key path expressions is expressed by means of protocol composition
between key path type and Sendable protocol i.e. KeyPath<String, Int> & Sendable.
Augment the key path capability inference to include sendability checking based
on whether subscript component arguments captured by a key path are sendable
or not or, if there are subscript components a key path expression is always sendable.
Resolves: rdar://75861003
[AST] NFC: Rename `KeyPathExpr::{get, set}RootType` to `{get, set}Exp…
1f42585f
[ConstraintSystem] Extend KeyPathCapability to support sendability
2e1ca0a3
[ConstraintSystem] NFC: Adjust comment for `isKnownKeyPath` to cover …
c5d393f0
[AST] Add a way to retrieve key path and its root/value types from `K…
c9a8355c
[SIL] Add a way to retrieve key path type from `KeyPathInst`
229e5801
[CSGen] Any type vars in subscript index arguments should be connecte…
316e8f93
[CSSolver] Handle situations when key path expression has an existent…
Gated by
InferSendableFromCaptures
experimental flag.Swift forums pitch - https://forums.swift.org/t/pitch-inferring-sendable-for-methods-and-key-path-literals/68011
Sendability of key path expressions is expressed by means of protocol composition
between key path type and
Sendable
protocol i.e.KeyPath<String, Int> & Sendable
.Augment the key path capability inference to include sendability checking based
on whether subscript component arguments captured by a key path are sendable
or not or, if there are subscript components a key path expression is always sendable.
Resolves: rdar://75861003