Inspectopedia Help

Covariant 'equals()'

Reports equals() that takes an argument type other than Any? if the class does not have another equals() that takes Any? as its argument type.

Example:

class Foo { fun equals(other: Foo?): Boolean { return true } }

To fix the problem create equals() method that takes an argument of type Any?.

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Kotlin, @snapshot@

Last modified: 13 July 2023