-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CSDiagnostics] Diagnose contextual closure result mismatches via fixes #20407
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
[CSDiagnostics] Diagnose contextual closure result mismatches via fixes #20407
Conversation
Let's keep track of type mismatch between type deduced for the body of the closure vs. what is requested contextually, it makes it much easier to diagnose problems like: ```swift func foo(_: () -> Int) {} foo { "hello" } ``` Because we can pin-point problematic area of the source when the rest of the system is consistent. Resolves: rdar://problem/40537960
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!
@swift-ci please test |
Build failed |
@swift-ci please test Linux platform |
Build failed |
@shahmishal Any ideas what's up with |
This failure your seeing might be fixed by this revert |
@swift-ci test Linux |
Build failed |
@swift-ci please test Linux platform |
Build failed |
@swift-ci please test Linux platform |
Build failed |
Timeout again, let's try one more time. |
@swift-ci please test Linux platform |
Build failed |
@shahmishal Looks like every Linux build times out on lldb tests :( |
@swift-ci please smoke test Linux platform |
We are looking into this issue right now, I would hold off from trigger Linux build. |
Alright, thank you! |
@swift-ci please smoke test Linux platform |
@swift-ci please test Linux platform |
@shahmishal Thank you! |
Let's keep track of type mismatch between type deduced
for the body of the closure vs. what is requested
contextually, it makes it much easier to diagnose
problems like:
Because we can pin-point problematic area of the source
when the rest of the system is consistent.
Resolves: rdar://problem/40537960