Closed
Description
I hope the title makes any sense. The following code fails to unpickle (using play-json 2.4.3):
import play.api.libs.json._
object NoDenotationOwnerError {
case class Foo()
trait FooFormats {
implicit val fooFormats: Format[Foo] = new Format[Foo] {
override def reads(json: JsValue): JsResult[Foo] = JsSuccess(json.as[Foo])
override def writes(o: Foo): JsValue = Json.toJson(o)
}
}
}
The following stacktrace is printed: http://pastebin.com/B0adHAkS. The val <none>
lines are a result of a println of the symbol when an IDENTtree
is matched in the Scala2Unpickler.
(a full project with this code snippet and dotty configured in sbt can be found here)