I am trying to serialize a Scala class using Pickling.
import scala.pickling.Defaults._
import scala.pickling.json._
trait Tr[T<: Tr[T]]{}
class Sub(z: Int) extends Tr[Sub] {}
class Data(b: Tr[_])
val message = new Data(new Sub(1)).pickle.value
I am getting this error on compilation:
Error:..... type arguments [_$2] do not conform to trait Tr's type parameter bounds [T <: Tr[T]] val message = new Data(new Sub(1)).pickle.value
class Data[T<: Tr[T]](val b: Tr[T])- mfirry