Skip to content

Conversation

@xedin
Copy link
Contributor

@xedin xedin commented Aug 13, 2025

If the parameter is Any we assume that all candidates are convertible to it, which makes it a perfect match. The solver would then decide whether erasing to an existential is preferable.

Resolves: rdar://157644867

If the parameter is `Any` we assume that all candidates are
convertible to it, which makes it a perfect match. The solver
would then decide whether erasing to an existential is preferable.

Resolves: rdar://157644867
@xedin xedin requested a review from hborla as a code owner August 13, 2025 22:00
@xedin
Copy link
Contributor Author

xedin commented Aug 13, 2025

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Aug 13, 2025

@swift-ci please test source compatibility

}
}

// If the parameter is `Any` we assume that all candidates are
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the type is non-Copyable or non-Escapable? Does any ~Copyable need a special case too?

Copy link
Contributor Author

@xedin xedin Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd let the solver decide what to do with that, the idea here is to avoid filtering it out which would mean it won't be attempted at all.

@xedin xedin merged commit 030564b into swiftlang:main Aug 14, 2025
7 checks passed
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