Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Compile time serialisation failing for nested case classes with Scala 2.10.6 #441

Open
ChetanBhasin opened this issue Aug 30, 2016 · 2 comments

Comments

@ChetanBhasin
Copy link

Here is the console history:

scala> import scala.pickling._;   import scala.pickling.json._;   import scala.pickling.static._;   import scala.pickling.Defaults._;
import scala.pickling._
import scala.pickling.json._
import scala.pickling.static._
import scala.pickling.Defaults._

scala> case class Inner(name: String, age: Int)
defined class Inner

scala> case class Outer(inner: Inner, ints: List[Int])
defined class Outer

scala> val person = Outer(Inner("Chetan", 20), List(1, 2, 3))
person: Outer = Outer(Inner(Chetan,20),List(1, 2, 3))

scala> person.pickle
<console>:43: error: Cannot generate a pickler for Outer. Recompile with -Xlog-implicits for details
       person.pickle
              ^

scala> person.inner.pickle
res2: pickling.json.pickleFormat.PickleType =
JSONPickle({
  "$type": "Inner",
  "name": "Chetan",
  "age": 20
})

@heathermiller
Copy link
Member

What version are you using?

@ChetanBhasin
Copy link
Author

@heathermiller The version is 10.0.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants