scala> class B { override def foo(i: Int): Unit = {}; } -- [E036] Reference Error: ------------------------------------------- 4 |class B { override def foo(i: Int): Unit = {}; } | ^ | method foo overrides nothing longer explanation available when compiling with `-explain` scala> class A { def foo: Unit = {}; } defined class A scala> class B extends A { override def foo(i: Int): Unit = {}; } -- [E037] Reference Error: ------------------------------------------- 5 |class B extends A { override def foo(i: Int): Unit = {}; } | ^ | method foo has a different signature than the overridden declaration longer explanation available when compiling with `-explain` scala> :quit