Open
Description
Note: Sorry for the poor title choice. I can't think of a concise way to describe this more accurately. Feel free to rename of course.
Compiler version
3.0.0-RC1
Minimized code
object X {
class Component[P, S]
trait Unmounted[P, M]
trait Mounted[P, S]
def unmounted[P, S, M](p: P, m: Component[P, S] => M): Unmounted[P, M] =
???
def mounted[P, S](r: Component[P, S]): Mounted[P, S] =
???
def test_KO[P, S](p: P): Unmounted[P, Mounted[P, S]] =
unmounted(p, mounted) // error
def test_OK[P, S](p: P): Unmounted[P, Mounted[P, S]] =
unmounted(p, mounted[P, S]) // ok
}
Output
14 | unmounted(p, mounted) // error
| ^^^^^^^
| Found: X.Mounted[P, Any]
| Required: X.Mounted[P, S]
Expectation
It should compile. Scala 2.x compiles without problem.