Skip to content
This repository was archived by the owner on Feb 20, 2019. It is now read-only.
This repository was 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

Description

@ChetanBhasin

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
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions