-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CSBinding] Infer key path root bindings transitively through context… #70212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci please test |
@swift-ci please test source compatibility |
@swift-ci please test |
@swift-ci please test source compatibility |
@swift-ci please test Windows platform |
…tual 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.
…djacent 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.
This makes sure that we never run into infinite recursion situations with transitive bindings that could have been aseembled and not properly checked.
@swift-ci please test |
@swift-ci please test source compatibility |
@swift-ci please test Linux platform |
@swift-ci please test |
@swift-ci please test source compatibility |
2 similar comments
@swift-ci please test source compatibility |
@swift-ci please test source compatibility |
Source compatibility suite is having unrelated issues, I'm just going to land this since it passed before without the last commit which shouldn't have any effect. |
…ual 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 hasa binding set of
{String}
its bindings are transferable over to resolve thekey path which would be ultimately bound to the contextual type.
Resolves: rdar://102384255