Skip to content

[4.2] [Diagnostics] Hint contextual type diagnostics with expression type if known #16582

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 13, 2018

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 13, 2018

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
(cherry picked from commit 934351a)

xedin added 2 commits May 13, 2018 12:36
…lution types

This allows callees of `getPossibleTypesOfExpressionWithoutApplying`
to get only unique types from the re-run of the solver.

(cherry picked from commit 7500c6e)
…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
(cherry picked from commit 934351a)
@xedin
Copy link
Contributor Author

xedin commented May 13, 2018

@swift-ci please test

@xedin xedin merged commit 046010d into swiftlang:swift-4.2-branch May 13, 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.

1 participant