-
Notifications
You must be signed in to change notification settings - Fork 149
Open
Description
The following code compiles and produces Right(Box(42)) on Scala 2:
import zio.json._
case class Box[A: Numeric](value: A)
implicit def decoder[A: Numeric: JsonDecoder] = DeriveJsonDecoder.gen[Box[A]]
"""{"value": 42}""".fromJson[Box[Int]] No given instance of type scala.deriving.Mirror.Of[Playground.Box[A]] was found for parameter mirror of method gen in object DeriveJsonDecoder. Failed to synthesize an instance of type scala.deriving.Mirror.Of[Playground.Box[A]]:
* class Box is not a generic product because it takes more than one parameter list
* class Box is not a generic sum because it is not a sealed class
https://scastie.scala-lang.org/Pg8k649ETC6cOq7ybPRRow
This seems to be a limitation of using mirrors for Scala 3.
Metadata
Metadata
Assignees
Labels
No labels