Skip to content

[5.5][CSSimplify] Increase fix impact when passing closure to a non-function type parameter #37388

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
May 13, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 12, 2021

Cherry-pick of #37373


  • Explanation:

Improve a diagnostic when a closure is used as an argument in an overloaded call.

In overloaded context it's possible that there is an overload that
expects a closure but it can have other issues e.g. different number
of parameters, so in order to pick a better solution let's always
increase a score for overloads where closure is matched against a
non-function type parameter. Also a note which points out where
exactly anonymous parameters are used in the multi-statement
body is helpful to identify problematic and fix the issue.

Resolves: rdar://76058892

…on type parameter

In overloaded context it's possible that there is an overload that
expects a closure but it can have other issues e.g. different number
of parameters, so in order to pick a better solution let's always
increase a score for overloads where closure is matched against a
non-function type parameter. Also a note which points out where
exactly anonymous parameters are used in the multi-statement
body is helpful to identify problematic and fix the issue.

Resolves: rdar://76058892
@xedin xedin added the r5.5 label May 12, 2021
@xedin xedin requested a review from a team as a code owner May 12, 2021 18:48
@xedin
Copy link
Contributor Author

xedin commented May 12, 2021

@swift-ci please test

@airspeedswift airspeedswift merged commit 04ea485 into swiftlang:release/5.5 May 13, 2021
@AnthonyLatsis AnthonyLatsis added swift 5.5 🍒 release cherry pick Flag: Release branch cherry picks 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 swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants