[scala] Unsoundness in higher-order type parameters?
Hi,
Consider these definitions:
///////////////////////////////////////
trait A[B[_[X, Y <: X]]] {
def f() : B[P]
}
trait C[_[X, Y]]
trait P[X, Y <: X]
///////////////////////////////////////
Type application C[P] is (correctly) rejected by the Scala 2.7.5
compiler. But A[C] is (incorrectly) accepted, which results in
incorrect type of member f(). It looks like unsoundness.
Thanks,
Vladimir