The compiler is telling me this can't be with a warning of: "contravariant type A occurs in covariant position in type >: A <: Any of type B." The warning is in the type parameter of the compose method. Logically the type definition makes sense to me. If the compiler has no qualms with andThen, why the problem with the converse?
trait Foo[-A]{
def compose[B >: A](t: Foo[B]): Foo[A] = t andThen this
def andThen[B <: A](t: Foo[B]): Foo[B]
}
All I need is an example where it breaks down. Then I'm happy.