-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Do not penalize binding or equality constraints involving Any. #6296
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 |
|
Build failed |
|
Interesting: |
|
Uh, yay for tests...?! |
|
@swift-ci Please test |
|
Build failed |
|
@swift-ci Please test |
|
Build failed |
|
@swift-ci Please test Linux platform |
|
@swift-ci Please test |
|
@swift-ci Please smoke test |
|
Build failed |
We currently have an element in the solution score related to whether we had a binding or equality constraint involving Any. Doing this yields some strange results, e.g. if overload resolution results in a property declared as Any we end up discarding that solution in favor of solutions that involve other overloads that are not declared as Any but are also not actually better solutions (e.g. overloads that are declared as function types). We really want to retain both solutions in this case and allow the ranking step of the solver to decide on the better choice. Fixes rdar://problem/29374163, rdar://problem/29691909.
|
@swift-ci Please smoke test and merge |
|
@swift-ci Please smoke test |
We currently have an element in the solution score related to whether we
had a binding or equality constraint involving Any.
Doing this yields some strange results, e.g. if overload resolution
results in a property declared as Any we end up discarding that solution
in favor of solutions that involve other overloads that are not declared
as Any but are also not actually better solutions (e.g. overloads that
are declared as function types).
We really want to retain both solutions in this case and allow the
ranking step of the solver to decide on the better choice.