Skip to content

Failed to unpickle play-json Format (resulting in NoDenotation.owner error) #1222

Closed
@agboom

Description

@agboom

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions