Created
September 2, 2024 11:49
-
-
Save nagat01/8642d0eccedfaa7b28d7bc73a3709e90 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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