Skip to content

Instantly share code, notes, and snippets.

@nrinaudo
Created March 5, 2017 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nrinaudo/cc00b9d093dc2bafd29cb67517398f16 to your computer and use it in GitHub Desktop.
Save nrinaudo/cc00b9d093dc2bafd29cb67517398f16 to your computer and use it in GitHub Desktop.
Non-final case classes
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