Closed
Description
Scalac is happy to compile the code below:
object Test {
trait Gen[T] {
def map[U](f: T => U): Gen[U] = ???
}
def f[T](implicit g: Gen[T]): Gen[() => T] =
g map ( () => _ )
}
whereas dotty fails with:
-- Error: local/func0.scala ----------------------------------------------------
8 | g map ( () => _ )
| ^
| missing parameter type for parameter _$1, expected = Test.Gen[() => T]