Foo here should probably not be treated as a SAM type if we want to be sane:
trait Foo {
def app(x: Object)(y: Object): Object
}
object O {
def main(args: Array[String]): Unit = {
val z: Foo = x => ???
}
}
Currently it takes a long time to produce an error message, it seems to spend most of its time in implicit search before giving up:
[error] try/closmulti.scala:7: error: type mismatch:
[error] found : Nothing
[error] required: (y: Object)Object
[error] val z: Foo = x => ???
[error] ^
[error] one error found