Skip to content

[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

Merged
merged 1 commit into from
Nov 9, 2018

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Nov 7, 2018

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:

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

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
@xedin xedin requested a review from rudkx November 7, 2018 22:29
Copy link
Contributor

@rudkx rudkx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@xedin
Copy link
Contributor Author

xedin commented Nov 8, 2018

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Nov 8, 2018

Build failed
Swift Test Linux Platform
Git Sha - 66a7930

@xedin
Copy link
Contributor Author

xedin commented Nov 8, 2018

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

swift-ci commented Nov 8, 2018

Build failed
Swift Test Linux Platform
Git Sha - 66a7930

@xedin
Copy link
Contributor Author

xedin commented Nov 8, 2018

@shahmishal Any ideas what's up with undefined symbol: uregex_open_55 on Linux?

@shahmishal
Copy link
Member

This failure your seeing might be fixed by this revert
swiftlang/swift-corelibs-foundation#1756

@shahmishal
Copy link
Member

@swift-ci test Linux

@swift-ci
Copy link
Contributor

swift-ci commented Nov 8, 2018

Build failed
Swift Test Linux Platform
Git Sha - 66a7930

@xedin
Copy link
Contributor Author

xedin commented Nov 8, 2018

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

swift-ci commented Nov 8, 2018

Build failed
Swift Test Linux Platform
Git Sha - 66a7930

@xedin
Copy link
Contributor Author

xedin commented Nov 8, 2018

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

swift-ci commented Nov 8, 2018

Build failed
Swift Test Linux Platform
Git Sha - 66a7930

@xedin
Copy link
Contributor Author

xedin commented Nov 8, 2018

Timeout again, let's try one more time.

@xedin
Copy link
Contributor Author

xedin commented Nov 8, 2018

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

swift-ci commented Nov 9, 2018

Build failed
Swift Test Linux Platform
Git Sha - 66a7930

@xedin
Copy link
Contributor Author

xedin commented Nov 9, 2018

@shahmishal Looks like every Linux build times out on lldb tests :(

@xedin
Copy link
Contributor Author

xedin commented Nov 9, 2018

@swift-ci please smoke test Linux platform

@shahmishal
Copy link
Member

We are looking into this issue right now, I would hold off from trigger Linux build.

@xedin
Copy link
Contributor Author

xedin commented Nov 9, 2018

Alright, thank you!

@shahmishal
Copy link
Member

@swift-ci please smoke test Linux platform

@shahmishal
Copy link
Member

@swift-ci please test Linux platform

@xedin xedin merged commit 57122c1 into swiftlang:master Nov 9, 2018
@xedin
Copy link
Contributor Author

xedin commented Nov 9, 2018

@shahmishal Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants