Inspections: Add inspection on equals()/hashCode()

This commit is contained in:
Alexey Sedunov
2015-10-15 18:57:08 +03:00
parent 127cb36602
commit 6f5d977728
8 changed files with 222 additions and 23 deletions
+39
View File
@@ -0,0 +1,39 @@
class C1 {
override fun equals(other: Any?) = true
}
class C2 {
override fun hashCode() = 0
}
class C3 {
override fun equals(other: Any?) = true
override fun hashCode() = 0
}
object O1 {
override fun equals(other: Any?) = true
}
object O2 {
override fun hashCode() = 0
}
object O3 {
override fun equals(other: Any?) = true
override fun hashCode() = 0
}
class C4 {
override fun equals(other: С4) = true
}
interface I {
override fun equals(other: Any?) = true
override fun hashCode() = 0
}
enum E {
override fun equals(other: Any?) = true
override fun hashCode() = 0
}