menegatti
return when { other == null -> false other !is Foo -> false other.hashCode() != hashCode() -> false else -> true }