Skip to content

Instantly share code, notes, and snippets.

@nagat01
Created September 2, 2024 11:49
Show Gist options
  • Select an option

  • Save nagat01/8642d0eccedfaa7b28d7bc73a3709e90 to your computer and use it in GitHub Desktop.

Select an option

Save nagat01/8642d0eccedfaa7b28d7bc73a3709e90 to your computer and use it in GitHub Desktop.
import scala.language.strictEquality
case class A(x: String)
case class B(x: String)
given CanEqual[A, B] = CanEqual.derived
@main def main = {
val a = A("a")
val b = B("b")
println(a == b)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment