In Scala 2.10.4 this compiles:
trait Foo[-U,T]{
type Contra = U
}
but in 2.11.0 the same fails with:
contravariant type U occurs in invariant position in type U of type Contra trait Foo[-U,T] {type Contra = U}
Is there a workaround available? Trying to port over a Scala library to 2.11 and the contravariant type is required in order to get a boatload of implicit defs picked up by the compiler (i.e. making U invariant doesn't seem to be an option).
Thanks
type Contra >: U
? – n. 1.8e9-where's-my-share m.@uncheckedVariance
– virtualeyes