Skip to content

[Diagnostics] Hint contextual type diagnostics with expression type i… #16576

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 2 commits into from
May 12, 2018

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 12, 2018

…f known

Avoid a re-typecheck in diagnoseContextualConversionError if the
expression type is already known and only return true if we know
that at least one error diagnostic has been emitted otherwise there
is a risk that type-check is going to return without any and fail
in verifier.

Resolves: rdar://problem/40002266

@xedin
Copy link
Contributor Author

xedin commented May 12, 2018

@swift-ci please test

…lution types

This allows callees of `getPossibleTypesOfExpressionWithoutApplying`
to get only unique types from the re-run of the solver.
@xedin xedin force-pushed the rdar-40002266-reapply branch from d2946c0 to f672605 Compare May 12, 2018 18:30
@xedin
Copy link
Contributor Author

xedin commented May 12, 2018

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - d2946c06ef1800a94882a87e861c9ee7fcd2aee8

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - d2946c06ef1800a94882a87e861c9ee7fcd2aee8

@xedin
Copy link
Contributor Author

xedin commented May 12, 2018

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - f6726051dd61228c3b838836383eea78f935f61a

@xedin
Copy link
Contributor Author

xedin commented May 12, 2018

@huonw I don't know what is going on here but my changes didn't actually change that diagnostic, they fail with updated one...

@xedin xedin force-pushed the rdar-40002266-reapply branch from f672605 to aa89729 Compare May 12, 2018 20:52
@xedin
Copy link
Contributor Author

xedin commented May 12, 2018

@swift-ci please clean test

…f known

Avoid a re-typecheck in `diagnoseContextualConversionError` if the
expression type is already known and only return `true` if we know
that at least one error diagnostic has been emitted otherwise there
is a risk that type-check is going to return without any and fail
in verifier.

Resolves: rdar://problem/40002266
@xedin xedin force-pushed the rdar-40002266-reapply branch from aa89729 to 934351a Compare May 12, 2018 20:57
@xedin
Copy link
Contributor Author

xedin commented May 12, 2018

@swift-ci please clean test

@swiftlang swiftlang deleted a comment from swift-ci May 12, 2018
@swiftlang swiftlang deleted a comment from swift-ci May 12, 2018
@swiftlang swiftlang deleted a comment from swift-ci May 12, 2018
@swiftlang swiftlang deleted a comment from swift-ci May 12, 2018
@huonw
Copy link
Contributor

huonw commented May 12, 2018

I don't know what is going on here but my changes didn't actually change that diagnostic, they fail with updated one...

I think it's inconsistent which diagnostic is emitted.

@xedin
Copy link
Contributor Author

xedin commented May 12, 2018

@huonw No problem!

@xedin xedin merged commit 5de416c into swiftlang:master May 12, 2018
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.

3 participants