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
The following appears to send the compiler into an infinite loop, but only when the return type of x is used to infer the type parameter of the call to y:
object C {
trait X[T]
implicit def u[A, B]: X[A | B] = new X[A | B] {}
def y[T](implicit x: X[T]): T = ???
val x: 1 & 2 | 2 & 3 = y
}
My guess is that the interaction between the type inference of y's parameter T and implicit search is underconstrained. The type expression (1 & 2 | 2 & 3) must contain at least one repeated type (here, 2).
The text was updated successfully, but these errors were encountered:
The following appears to send the compiler into an infinite loop, but only when the return type of
x
is used to infer the type parameter of the call toy
:My guess is that the interaction between the type inference of
y
's parameterT
and implicit search is underconstrained. The type expression (1 & 2 | 2 & 3
) must contain at least one repeated type (here,2
).The text was updated successfully, but these errors were encountered: