-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CSBindings] Don't try to rank bindings based on number of defaults i… #16590
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 |
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.
This seems problematic, as do the other tests that are looking at properties of x
.
Consider what happens if you take the bindings from two type variables, T1 and T2, and pass them into this function twice, in different orders. You can end up with
T1 < T2
being false, and T2 < T1
being false, which implies that T1 == T2
.
Based on your commit message, you're attempting to look for differences in type bindings other than the number of defaults, so this change does not seem consistent with that goal.
@rudkx There is a check for |
I'll make it so it always tests both sides to make this less ambiguous. |
@rudkx suggested even better approach - we can just check |
…f they are literal Number of defaults is a fallback condition if there are no other differences, but pontential bindings which are literal should always be ranked lower than anything else because there is a higher chance that such bindings are wrong because their full set might not have been resolved yet. Resolves: rdar://problem/39616039
@swift-ci please test |
@swift-ci please test source compatibility |
Build failed |
Build failed |
@swift-ci please test source compatibility |
1 similar comment
@swift-ci please test source compatibility |
@swift-ci please test macOS platform |
Both failed with |
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.
LGTM, thanks!
…f they are literal
Number of defaults is a fallback condition if there are no other
differences, but pontential bindings which are literal should always
be ranked lower than anything else because there is a higher chance
that such bindings are wrong because their full set might not have
been resolved yet.
Resolves: rdar://problem/39616039