Skip to content

[5.6][CSApply] Result coercion check should always use resolved type #41109

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
Feb 1, 2022

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jan 31, 2022

Cherry-pick of #41108


  • Explanation:

Fix a crash when function body consists of a single expression that returns Never
from a method call on overloaded base.

shouldCoerceToContextualType used solution.getType(ASTNode)
which returns a type that has type variables in it. To properly
check whether result type needs a coercion it has to be resolved
first which is done via solution.getResultType(ASTNode).

Resolves: rdar://88285682
(cherry picked from commit 48ffedd)

`shouldCoerceToContextualType` used `solution.getType(ASTNode)`
which returns a type that has type variables in it. To properly
check whether result type needs a coercion it has to be resolved
first which is done via `solution.getResultType(ASTNode)`.

Resolves: rdar://88285682
(cherry picked from commit 48ffedd)
@xedin xedin added the r5.6 label Jan 31, 2022
@xedin xedin requested a review from hborla January 31, 2022 22:53
@xedin xedin requested a review from a team as a code owner January 31, 2022 22:53
@xedin
Copy link
Contributor Author

xedin commented Jan 31, 2022

@swift-ci please test

@xedin xedin merged commit 0984180 into swiftlang:release/5.6 Feb 1, 2022
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.6 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants