FIR: Fix special members came from superclass

class JavaSuperClass {
  // members impls with special signature, but it doesn't override any Kotlin specials
}

class KotlinInterface {
   // special members
}

class JavaSubClass extends JavaSuperClass implements KotlinInterface {
   // we should obtain members from JavaSuperClass with their Kotlinish
   // signature, not the Java one
}
This commit is contained in:
Denis.Zharkov
2022-04-21 11:43:46 +03:00
committed by teamcity
parent a0c92db819
commit bf96abeed1
3 changed files with 24 additions and 31 deletions
@@ -25,15 +25,15 @@ class K2 : JavaClass() {
}
class K3 : JavaClass() {
override fun foo(x: Int, y: Continuation<String>): Any? = null
<!NOTHING_TO_OVERRIDE!>override<!> fun foo(x: Int, y: Continuation<String>): Any? = null
}
fun builder(block: suspend () -> Unit) {}
fun main(x: Continuation<String>) {
JavaClass().foo(5, x)
K1().foo(6, x)
K2().foo(7, x)
JavaClass().foo(5, <!TOO_MANY_ARGUMENTS!>x<!>)
K1().foo(6, <!TOO_MANY_ARGUMENTS!>x<!>)
K2().foo(7, <!TOO_MANY_ARGUMENTS!>x<!>)
K3().foo(8, x)
builder {
@@ -42,9 +42,9 @@ fun main(x: Continuation<String>) {
K2().foo(3)
K3().foo(4)
JavaClass().foo(5, x)
K1().foo(6, x)
K2().foo(7, x)
JavaClass().foo(5, <!TOO_MANY_ARGUMENTS!>x<!>)
K1().foo(6, <!TOO_MANY_ARGUMENTS!>x<!>)
K2().foo(7, <!TOO_MANY_ARGUMENTS!>x<!>)
K3().foo(8, x)
}
}