Error:(78, 18) The referenced trait [[Tree]] does not have any sub-classes. This may happen due to a limitation of scalac (SI-7046) given that the trait is not in the same package. If this is the case, the hierarchy may be defined using integer constants.
println(write(tree))
And it's true that Tree doesn't have any sub-classes it is instantiated like
object Tree extends TreeInstances {
/**
* Node represents a tree node that may have children.
*
* You can use Node for tree construction or pattern matching.
*/
object Node {
def apply[A](root: => A, forest: => Stream[Tree[A]]): Tree[A] = {
new Tree[A] {
private[this] val rootc = Need(root)
private[this] val forestc = Need(forest)
def rootLabel = rootc.value
def subForest = forestc.value
override def toString = "<tree>"
}
}
def unapply[A](t: Tree[A]): Option[(A, Stream[Tree[A]])] = Some((t.rootLabel, t.subForest))
}
But, is any way to pickle/unpickle sealed abstract classes that doesn't have concrete instances with uPickle?
Hi guys,
I have the following case class
When i try to
I receive the following error:
And it's true that Tree doesn't have any sub-classes it is instantiated like
But, is any way to pickle/unpickle sealed abstract classes that doesn't have concrete instances with uPickle?
Regards, B.
ID: 169 Original Author: bobymicroby