You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
debug/Debug.scala:18: error: magnolia: could not find Diff.Typeclass for type Option[foobar.Debug.A]
in parameter 'id' of product type foobar.Debug.B
implicit val diffB: Derived[Diff[B]] = Diff.derived[B]
Versions:
diffx: 0.4.5
Magnolia: 0.17.0
Mercator: 0.3.0
Scala 2.13.5 but also reproduces on 2.12.13
package foobar
import com.softwaremill.diffx._
object Debug {
// This is scalapb.Message in real code.
trait T[C]
// Removing the inheritance makes it compile.
final case class A() extends T[A]
final case class B(id: Option[A])
implicit val diffA: Derived[Diff[A]] = Diff.derived[A]
implicit val diffB: Derived[Diff[B]] = Diff.derived[B]
// Fails with: error: magnolia: could not find Diff.Typeclass for type Option[foobar.Debug.Identifier]
}
The issue goes away when removing the extension of T but as mentioned in the comment this comes from generated ScalaPb code so this is not an option.
The text was updated successfully, but these errors were encountered:
The example below fails with the following error:
Versions:
The issue goes away when removing the extension of
T
but as mentioned in the comment this comes from generated ScalaPb code so this is not an option.The text was updated successfully, but these errors were encountered: