-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Infer missing implicit args in using clause #9347
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
Infer missing implicit args in using clause #9347
Conversation
If there are some missing arguments in a using argument clause, infer them with implicit search.
isImplicitMethod is implied by isContextualMethod, no need to test the two separately.
In a using argument clause with missing arguments: - resolve to defaults first, - only if that fails, do an implicit argument search. This is the same as if all implicit parameters `x: T` that did not have an explicit default now are given one like this: x: T = summon[T]
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9347/ to see the changes. Benchmarks is based on merging with master (a162b7b) |
@nicolasstucki Can you do another boostrap compiler with this PR once it is merged? I want to do a test to move all phase info out of contexts into a separate variable. I hope this can speed up the compiler since then (1) we use fewer contexts (about half as many with some additional tweaks) and (2) we are faster in the hot paths where we need to get the current phase id. I am now at a position where it's mostly a global search and replace. |
I'll rebootstrap tomorrow |
Included in #9356 |
If there are some missing arguments in a using argument clause, infer them
with implicit search.