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
{{ message }}
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.
Hello, I was trying to compare two case classes with nested optional structures but it seems that it doesn't work.
For example the following
import com.softwaremill.diffx.Diff.Typeclass
import com.softwaremill.diffx.*
case class Test(id: Int)
case class TestWrap(id: Test)
case class TestWrapWrap(id: Option[TestWrap])
val t1 = TestWrapWrap(Option(TestWrap(Test(1))))
val t2 = TestWrapWrap(Option(TestWrap(Test(2))))
given Typeclass[Test] = Diff.derived
given Typeclass[TestWrap] = Diff.derived
given Typeclass[TestWrapWrap] = Diff.derived
val diff = Diff[TestWrapWrap].ignore(_.id.each.id)
val diffResult = diff(t1, t2)
Hello, I was trying to compare two case classes with nested optional structures but it seems that it doesn't work.
For example the following
should pass but actually fails with:
if we set
then it ignores the optional id and it returns that they are identical
The text was updated successfully, but these errors were encountered: