Skip to content

Conversation

@xedin
Copy link
Contributor

@xedin xedin commented Jan 8, 2024

  • Don't resolve closures if when parameter doesn't accept them (it's not a function type or Any).

Doing so improves performance if closure is passed as an argument
to a (heavily) overloaded declaration, avoid unrelated errors,
propagate holes, and record a more impactful fix.

  • Provide a tailored message when closure is passed to a parameter that doesn't accept closures

xedin added 4 commits January 8, 2024 14:09
…d closures when matching to new parameter

Cannot rely that closure type is always resolved, but if the
other parameter has a correct shape, consider it a match.
…n't accept them

Doing so improves performance if closure is passed as an argument
to a (heavily) overloaded declaration, avoid unrelated errors,
propagate holes, and record a more impactful fix.
@xedin
Copy link
Contributor Author

xedin commented Jan 8, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jan 8, 2024

@swift-ci please test source compatibility

@xedin xedin merged commit 4c604b4 into swiftlang:main Jan 10, 2024
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.

2 participants