Skip to content

Instantly share code, notes, and snippets.

Avatar

Rinat Tainov taintech

View GitHub Profile
View equals symmetry is not respected.scala
trait Car {
val doorsNb: Int
override def equals(a: Any) = {
a match {
case c: Car => doorsNb == c.doorsNb
case other => false
}
}
}