[FIR] Bring conflicting overloads errors closer to K1 behavior

#KT-55860 Fixed
This commit is contained in:
Kirill Rakhman
2023-03-24 15:58:05 +01:00
committed by Space Team
parent 9dd778bc89
commit 56da3c2ee2
12 changed files with 124 additions and 28 deletions
@@ -0,0 +1,31 @@
// SKIP_TXT
open class A {
fun <T> some(s: String): T = null!!
}
interface I {
fun some(text: String) = ""
}
open <!CONFLICTING_INHERITED_MEMBERS!>class X1<!> : A(), I
open class X2 : X1()
// for some reason no error in K1
open class B {
fun <T> some(s: String): T = null!!
fun some(text: String) = ""
}
open class X3 : B()
open class X4 : X3()
open class C {
fun <T> some(s: String): T = null!!
}
open class X5 : C() {
<!CONFLICTING_OVERLOADS!>fun some(text: String)<!> = ""
}
open class X6 : X5()