Files
kotlin-fork/compiler/testData/diagnostics/tests/operatorsOverloading/EqualsOperatorOverrideHierarchies.fir.kt
T
2023-01-04 08:08:32 +00:00

26 lines
715 B
Kotlin
Vendored

open class Parent {
override fun equals(other: Any?): Boolean =
super.equals(other)
}
open class OperatorParent {
override operator fun equals(other: Any?): Boolean =
super.equals(other)
}
class A : Parent() {
override fun equals(other: Any?): Boolean =
super.equals(other)
}
class B : OperatorParent() {
override fun equals(other: Any?): Boolean =
super.equals(other)
}
class C : Parent() {
override operator fun equals(other: Any?): Boolean = // false positive in K1, OK in K2
super.equals(other) //
}
class D : OperatorParent() {
override operator fun equals(other: Any?): Boolean = // false positive in K1, OK in K2
super.equals(other)
}