Open
Description
Compiler version
3.0.1;
3.1.0
Minimized code
def f(i: => Int): String = i.toString()
object Test {
def test[RES](factory: () => RES): RES = ???
def test[A, RES](factory: (A) => RES): RES = ???
}
Test.test(f _)
Output
[error] -- [E134] Type Error: [...]/TestMain.scala:23:5
[error] 23 |Test.test(f _)
[error] |^^^^^^^^^
[error] |None of the overloaded alternatives of method test in object Test with types
[error] | [A, RES](factory: A => RES): RES
[error] | [RES](factory: () => RES): RES
[error] |match arguments ((=> Int) => String)
Expectation
In Scala 2.13.6 it compiles, so I expect it to compile in 3.0.1 as well