trait Element[+A] {
type T = A
}
// Error: covariant type A occurs in invariant
// position in type A of type T type T = A
Why it's not allowed to use covariant type parameter in type member?
There is an answer for this question, but the explanation doesn't cover question "why" enough good. Would be nice to have some examples where it break type system in runtime.
Edit:
As I found there is a long history of this restriction:
SI-6566 (and this) - non-private type aliases must be invariant
SI-7093 - the protected[this] variance escape hatch is unsound