Kotlin
Covariant 'equals()'
Warning
Last modified: 03 December 2024 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?
.
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
-CovariantEquals
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Kotlin, 243.23126-IJ |
Thanks for your feedback!
Was this page helpful?