Files
kotlin-fork/idea/testData/inspections/equalsAndHashCode/test.kt
T
2015-11-24 14:03:48 +03:00

49 lines
763 B
Kotlin
Vendored
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
}
abstract class T
object O4 : A() {
override fun equals(other: Any?) = true
}
object O5 : A() {
override fun hashCode() = 0
}