Closed
Description
Compiler version
3.3.0
Minimized code
trait F[-R]
trait Row[A]
def eliminateInt[R](f: F[R & Row[Int]]): F[R] = new F[R] {}
val x = new F[Row[Int] & Row[String]] {}
val _ = eliminateInt[Row[String]](x) // compiles OK when given explicit type
val _ = eliminateInt(x) // error!
Output
Found: (app.x : app.F[app.Row[Int] & app.Row[String]])
Required: app.F[app.Row[Int]]
Expectation
I expect compiler to be able to infer [R]
instantiation based on a type of a passed value.