Commit Graph

3 Commits

Author SHA1 Message Date
Pavel Yaskevich
9875fcf7e8 [CSBindings] Apply more checking to transitively inferred bindings
This makes sure that we never run into infinite recursion situations
with transitive bindings that could have been aseembled and not
properly checked.
2023-12-07 15:32:03 -08:00
Pavel Yaskevich
78c1e1be69 [CSBindings] Transitive key path root inference should make note of adjacent vars
Binding inference through a contextual root variable should include
marking contextual root and all of its adjacent variables as adjacent
to a key path root variable as well otherwise transitively inferred
bindings are ranked incorrectly.
2023-12-07 14:09:22 -08:00
Pavel Yaskevich
835fa02016 [CSBindings] Infer key path root bindings transitively through contextual root variable
Since generic arguments have to match exactly the inference could
be extended to transfer bindings through contextual root types if
they are sufficiently resolved (not delayed).

For example if key path expression is passed as an argument to
a parameter like `WritableKeyPath<$Root, $Value>` and `$Root`
is not yet bound but has a binding set of `{String}` its bindings
are transferable over to resolve the key path which would be
ultimately bound to the contextual type.
2023-12-07 14:09:22 -08:00