We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code fails to compile with a could not find Lazy implicit value of type julienrf.json.derived.DerivedReads[A]:
could not find Lazy implicit value of type julienrf.json.derived.DerivedReads[A]
import julienrf.json.derived import play.api.libs.json._ sealed trait Minimize object Minimize { implicit val formats: OFormat[Minimize] = derived.flat.oformat((__ \ "type").format[String]) } case class MinimizeA(a: String) extends Minimize case class MinimizeB(b: Int) extends Minimize
The following code compiles successfully:
import julienrf.json.derived import play.api.libs.json._ sealed trait Minimize case class MinimizeA(a: String) extends Minimize case class MinimizeB(b: Int) extends Minimize object Minimize { implicit val formats: OFormat[Minimize] = derived.flat.oformat((__ \ "type").format[String]) }
As there is a workaround, this is not a critical bug, but it felt like a "gotcha" moment.
The text was updated successfully, but these errors were encountered:
If I remember well it’s a limitation of knownDirectSubclasses. I think this PR scala/scala#5284 fixed the issue, though. Are you using Scala 2.12?
knownDirectSubclasses
Sorry, something went wrong.
No branches or pull requests
The following code fails to compile with a
could not find Lazy implicit value of type julienrf.json.derived.DerivedReads[A]
:The following code compiles successfully:
As there is a workaround, this is not a critical bug, but it felt like a "gotcha" moment.
The text was updated successfully, but these errors were encountered: