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
Fix#8802: Use wildcards for result type approximation of implicits
Use wildcards for result type approximation of dependent implicit methods.
In a situation like
```
def f(using x: T): C[x.Out]
```
we need to go constrain the result type of `f` before doing the implicit
search for `T`. Previously we created a fresh type variable `param(1)` with
`T & Singleton` as upper bound. That works well for other uses of
result type approximation, but in this case, we miss constraining
`param(1)` from below by the result of the implicit search. So in the end
`param(1)` gets interpolated to its upper bound, which leads to problems.
One possible solution is to add the missing lower constraint for the dependent
type variable. But it's easier to just use a Wildcard type, which is what
this PR does.
0 commit comments