class A {
def a(): Unit = ()
def b[T](f: A => T): T = f(new A())
def c(): Unit = b { _.a() }
def d(): Boolean = b { w => w.a(); true }
//def e(): Boolean = b { _.a(); true } // does not compile - why not, if c compiles?
}
In the e() method of the above class, I thought the compiler would be able to infer the type of "_" as it does in c(). However, with scala 2.11.7, e() results in a "missing parameter type for expanded function. Why? Is it something the compiler ought to be able to (=compiler bug) or is the compiler correct in complaining?