- Notifications
You must be signed in to change notification settings - Fork 10.6k
[Sema] Diagnose function coercion ambiguity #63904
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
[Sema] Diagnose function coercion ambiguity #63904
Conversation
| @swift-ci Please smoke test |
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.
Thank you!
7e88e66 to 33b8fde Compare | @swift-ci Please smoke test |
33b8fde to 1f611ae Compare | @swift-ci please smoke test |
| @swift-ci Please smoke test |
c37eaa4 to b5e184b Compare 936e1c4 to e24040c Compare e24040c to 4f55e40 Compare
hamishknight left a comment
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.
Looking good! Just one more comment, and a suggestion for potential future work that could be done here
4f55e40 to d065479 Compare
hamishknight left a comment
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! I'll let @xedin have the final say though
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 feels like a workaround for the fact that fixes don't have correct locators for some specific situations where the problem is with structure of the types being coerced, should be adjust locator at the point of fix instead?
| You mean record the fix anchored on the coerce subexpr in those cases? |
| @swift-ci Please smoke test MacOS |
| @swift-ci Please smoke test MacOS Platform |
693c588 to 5fee07b Compare bb18688 to 1fcb03f Compare 1fcb03f to d3b1562 Compare 837a109 to af584bd Compare af584bd to 4ebedc8 Compare
xedin left a comment
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.
Looks great, thank you!
59dfcc7 to b375c09 Compare | @swift-ci Please test |
| @swift-ci Please test MacOS Platform |
In previous PR was handling only failures located in argument mismatch, but ambiguity of overload in coerce subexpr can come from other fixes as well e.g. contextual mismatch, not only located in
FunctionArgument. So is a more general approach look for the overload subexpr.Resolves #63834