Skip to content

Instantly share code, notes, and snippets.

@nagat01
Created September 3, 2024 03:40
Show Gist options
  • Select an option

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

Select an option

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