Any class overriding `Any#equals(other: Any?)` should respect this contract, accept any object as an argument, and return `false` when the
argument's type differs from the expected type. The `other` parameter's type can be checked using the `is` operator or by comparing the `javaClass` field:
However, it is an issue to assume that the `equals` method will only be used to compare objects of the same type. Casting the `other` parameter without a prior test will throw a `ClassCastException` instead of returning false.
[source,kotlin]
----
class MyClass {
override fun equals(other: Any?): Boolean {
val that = other as MyClass // may throw a ClassCastException