-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[NFC] Never synthesize @lvalue in typing judgements #16856
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 |
Build failed |
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 this is reasonable, but it looks like it might require special handling for mutable keypaths?
Aha, well I'm going to move the @lvalue synthesis to CSGen where it belongs. |
Build failed |
Scaling back to just the rule in matchTypes - attacking the keypath rule makes this patch unruly. @swift-ci please smoke test |
Only two more of these exist 1) CSGen's formation of @lvalue -> inout conversion constraints 2) WritableKeyPath's checking rules Both can be eliminated but will require more refactoring.
LLDB test timed out @swift-ci please smoke test |
@swift-ci please test source compatibility |
⛵️ |
When in a checking context, there is no need (and no sense) in synthesizing
@lvalue
instead of checking the underlying object type.The locators for this typing rule and the other parameter binding one below it are still lying, but probably because there's really no good way to indicate that you're an argument to a function/operator without also lying about the index of the argument - which matchTypes has no way of knowing.