[FIR JS] Implement FirJsInheritanceChecker

This commit is contained in:
Nikolay Lunyak
2023-01-04 15:37:15 +02:00
committed by Space Team
parent 9e1c6f2f61
commit 4cf8d9ffb9
17 changed files with 235 additions and 29 deletions
@@ -1,9 +0,0 @@
abstract class A : () -> Unit
object B : (String, Int) -> Long {
override fun invoke(a: String, B: Int) = 23L
}
abstract class C : kotlin.Function1<Any, Int>
abstract class D : C()
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
abstract class <!IMPLEMENTING_FUNCTION_INTERFACE!>A<!> : () -> Unit
<!IMPLEMENTING_FUNCTION_INTERFACE!>object B<!> : (String, Int) -> Long {
@@ -3,7 +3,7 @@ open external class A {
}
class B : A() {
override fun f(x: Int) {}
<!OVERRIDING_EXTERNAL_FUN_WITH_OPTIONAL_PARAMS!>override fun f(x: Int)<!> {}
}
class BB : A()
@@ -36,7 +36,7 @@ class E : D() {
}
class F : D(), I {
override fun f(x: Int) {}
<!OVERRIDING_EXTERNAL_FUN_WITH_OPTIONAL_PARAMS!>override fun f(x: Int)<!> {}
}
external class G : D, I {
@@ -51,9 +51,9 @@ open external class XE {
fun f(x: Int)
}
class Y : X(), I
class <!OVERRIDING_EXTERNAL_FUN_WITH_OPTIONAL_PARAMS_WITH_FAKE!>Y<!> : X(), I
class YY : A(), II
class <!OVERRIDING_EXTERNAL_FUN_WITH_OPTIONAL_PARAMS_WITH_FAKE!>YY<!> : A(), II
external class YE: XE, I