I have the following:
object T { abstract class First { def doSomething= (s:String) => Unit } class Second extends First { override def doSomething = { (s:String) => () } } def main(args: Array[String]): Unit = { new Second().doSomething } } but this fails to compile with the error:
Error:(8, 21) type mismatch; found : Unit required: Unit.type (s:String) => () Why isn't the override from class Second valid? How could I make it work?