-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[ConstraintSystem] More changes to key path inference #69742
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
Merged
xedin
merged 13 commits into
swiftlang:main
from
xedin:transitive-keypath-base-inference
Nov 15, 2023
Merged
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8292c7d
[ConstraintSystem] Add a way to check whether type variable represent…
xedin 54b5676
[CSBindings] Infer key path root bindings transitively
xedin 3c69f4d
[ConstraintSystem] Key path capability inference should fail if there…
xedin 4f5123e
[CSDiagnostics] Make contextual key path type mismatch diagnostic con…
xedin 0a2f1b1
[CSBindings] Delay key path type inference until literal capability i…
xedin e67dfc1
[CSSimplify] Remove obsolete key path capability inference and matching
xedin 0832afe
[MiscDiagnostics] Key path diagnostics should account for upcasts
xedin 9f21b95
[CSDiagnostics] A tailored diagnostic when passing key path as an arg…
xedin f84b3d4
[CSSimplify] Allow fixing root/value mismatches of a key path literal…
xedin 7812f5e
[CSSimplify] NFC: More non-functional changes in KeyPath simplification
xedin 7877c07
[CSGen] Fix one last incorrect key path locator use
xedin 153bd9d
[CSBindings] Add inferred key path type bindings only if there is no …
xedin 9c5d465
[CSSimplify] Remove eager bindings for key path type to a contextual …
xedin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in this case we can form a function type that uses root/value type variables and infers parameter flags from the binding, does that make sense, @Jumhyn? If we can make it work then I can remove remaining root/value matching logic from
simplifyKeyPathConstraint.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think I can approach that from a different angle. I Remembered that there is a hack to eagerly bind key path type if the contextual type is a function type. I think once I remove that everything and replace function result type with key path's value type everything is going to fall into place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @xedin was out of town last week, but the current solution LGTM!