Created
March 5, 2017 20:18
-
-
Save nrinaudo/cc00b9d093dc2bafd29cb67517398f16 to your computer and use it in GitHub Desktop.
Non-final case classes
This file contains 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
case class Foo(a: Int) | |
class Bar(a: Int, b: Int) extends Foo(a) | |
// Returns false | |
new Bar(1, 2) == new Bar(2, 2) | |
// Returns true!! | |
new Bar(1, 2) == new Bar(1, 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment