KT-33132: Add diagnostics test showing that issue is fixed in K2

^KT-33132: Fixed
This commit is contained in:
Stanislav Ruban
2023-01-03 19:12:19 +02:00
committed by Space Team
parent 4542b3947b
commit 0f179e8949
6 changed files with 111 additions and 0 deletions
@@ -0,0 +1,25 @@
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 <!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun equals(other: Any?): Boolean = // false positive in K1, OK in K2
super.equals(other) //
}
class D : OperatorParent() {
override <!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun equals(other: Any?): Boolean = // false positive in K1, OK in K2
super.equals(other)
}