I've attached a code sample which fails to compile. In it I override filter on Iterable with an abstract definition claiming to return a subtype of Iterable. This fails to compile with the error message
error overriding method filter;
method filter in trait Iterable of type (((T, T)) => Boolean)Iterable[(T, T)] has incompatible type ((A) => Boolean)Iterable[A]
trait Foo[T] extends Iterable[(T, T)]{
However, the second two traits defined in this file exhibit the same overriding pattern and work fine. Additionally, if I add an implementation (say = error("foo")) to the definition of filter in Foo, the type error goes away.