I have these lines (scala 2.11.11):
trait TypeClass[T] class DoubleIsTypeClass extends TypeClass[Double] implicit val forDouble = new DoubleIsTypeClass Know lets add the following line :
case class User[V[_], @specialized T : TypeClass](a: V[T]) Now it does not compile. Removing @specialized fixes it. Is it a bug ? I don't really need higher kinds here except their help with type inference but that is a big deal.
EDIT Just for those who may have stumbled upon a similar problem
Typeclasses are not the issue here, case classes are:
case class User[V[_], @specialized T](a: V[T]) The line above does not compile on its own.
@specialized?