the following code should typecheck afaik, but it doesn't. I'd rather avoid giving names to the argument types as those can change in arity and type.
trait Foobar[K] {
def method: K => Double
}
class Test extends Foobar[(String, Int, Boolean)] {
override def method: (String, Int, Boolean) => Double = (_, _, _) => 3.0
// This also fails
// override def method: (String, Int, Boolean) => Double = { case (_, _, _) => 3.0 }
}
The error is
overriding method method in trait Foobar of type => ((String, Int, Boolean) => Double; method method has incompatible type override def method: (String, Int, Boolean) => Double = (,,_) => 3.0