Didn't find the answer in these topics: first, second
Have the next problem. I have a case class named Foo:
case class Foo(a: Int, b: List[Int])
When I need to make an AST of this class I invoke Extraction.decompose(<instance of Foo>)
and get an AST represenation of foo instance.
But if I make field b
as private
case class Foo(a: Int, private val b: List[Int])
I get org.json4s.package$MappingException: Can't find ScalaSig for class java.lang.Object
exception.
This is only true for private fields that are collections.
If private field is simple object it simply doesn't get appeared in AST. Why this exception does happen?
EDIT The same exception arises if I have a case class extending some trait with val or lazy val fields:
trait Bar {
val list: List[Int] = List(1,2,3)
}
case class Example(field: Double) extends Bar