Skip to content

Fix #7793: Handle context parameters in resolveOverloaded #8406

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 3 commits into from
Mar 3, 2020

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Feb 29, 2020

resolveOverloaded now takes into account whether arguments are using
clauses or regular arguments.

Introduce an abstraction to reduce to a mapped problem
resolvePverloaded now takes into account whether arguments are using
clauses or regular arguments.
@odersky odersky changed the title Refactor resolveOverload Fix #7793: Handle context parameters in resolveOverloaded Feb 29, 2020
@odersky odersky marked this pull request as ready for review February 29, 2020 22:15
@odersky
Copy link
Contributor Author

odersky commented Mar 1, 2020

There are essentially two ways to solve #7793. We could fiddle with isApplicable to take account of arguments using clauses. #8395 did this by trying both scenarios: one wether the arguments are assumed to be passed regularly, the other where they are passed in a using clause. To avoid exponential blow-up one could refine this by passing the kind of argument clause as an additional parameter to isApplicable.

On the other hand, this is only needed for overloading resolution. In other scenarios, we adapt to the kind of argument clause before computing application types. And fiddling with isApplicable is only one measure of several to make resolveOverloaded work in scenarios like #7793. So it seems better to add the necessary logic directly to resolveOverloaded, which is what this PR does.

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