-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use all available context info for healing ambiguous implicits #11274
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
Conversation
ce08e50
to
b847f6f
Compare
When retrying after an ambiguous implicit, we now make use of all the information in the prototype, including ignored parts. We also try to match formal parameters with actually given arguments. Fixes scala#11243 Fixes scala#5773, which previously was closed with a more detailed error message.
Does this by chance also fix #7069? |
@prolativ Does not look likely. |
test performance please |
performance test scheduled: 36 job(s) in queue, 1 running. |
i"""normalizedCompatible for $poly, $pt = $result | ||
|constraint was: ${ctx.typerState.constraint} | ||
|constraint now: ${newctx.typerState.constraint}""") | ||
val existingVars = ctx.typerState.uninstVars.toSet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a def or moved inside the if condition to avoid calling toSet
unnecessarily.
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/11274/ to see the changes. Benchmarks is based on merging with master (524a129) |
When retrying after an ambiguous implicit, we now make use of all the
information in the prototype, including ignored parts. We also try
to match formal parameters with actually given arguments.
Fixes #11243
Fixes #5773, which previously was closed with a more detailed error message.