Scala: overriding type member with bounds
问题 I've narrowed down my issue to the following minimal (non-)working example: class Z trait A[E <: Z] { type T[X <: E] <: A[X] } trait B[E <: Z] extends A[E] { type T[X <: E] <: B[X] } trait C[E <: Z, F[X <: Z] <: C[X, F]] extends A[E] { type T[X <: E] = F[X] } class D[E <: Z] extends B[E] with C[E, D] It is sort of a higher-kinded F-bounded polymorphism (I'm using T[E] as the return value of some methods). When I try to compile this code I get: error: overriding type T in trait B with bounds[X