case class A[T](t:T) case class WrapperA[T](a:A[T], t: T) val a: A[_] = A(4) WrapperA(a, 2)
fails with the following error
<console>:15: error: type mismatch; found : A[_$1] where type _$1 required: A[Any] Note: _$1 <: Any, but class A is invariant in type T. You may wish to define T as +T instead. (SLS 4.5) WrapperA(a, 2)
how can I make it work?
does the scala community prefer to post questions like this in contributors.scala-lang.org or at stackoverflow.com?
I had a couple of bad experiences on receiving no question at all on scala questions on stackoverflow (after months), but my scala contributors experience was amazing so far, immediate help)