You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Properly recover from nested ambiguous implicit search failures
From
http://dotty.epfl.ch/docs/reference/changed-features/implicit-resolution.html:
> The treatment of ambiguity errors has changed. If an ambiguity is
> encountered in some recursive step of an implicit search, the ambiguity
> is propagated to the caller.
This is supposed to be handled by `healAmbiguous` but the implementation
was incorrect: it compared pending candidates against the two ambiguous
results from the search, but this doesn't make sense when the failure
happened in a nested search: for example in `i9793`, the failure is:
Applied.bazApplied[F](/* ambiguous: both value baz and value bar match type Foo[F] */summon[Foo[F])
We should be able to recover from this failure because `barApplied` is
more specific than `bazApplied`, but before this commit we ended up
comparing `barApplied` to `baz` and `bar` which isn't meaningful.
Fixes#9793.
0 commit comments