[Test] KT-61360: add tests for the IrFakeOverrideBuilder
Add tests for fake overrides with focus on java interoperability Co-authored-by: Aleksandra Arsenteva <aleksandra.arsenteva@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
30aae741a6
commit
82255d5ee8
Vendored
+54
@@ -0,0 +1,54 @@
|
||||
open class A {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
inline fun foo() {
|
||||
}
|
||||
|
||||
open external fun foo2()
|
||||
|
||||
open suspend fun foo3() {
|
||||
}
|
||||
|
||||
inline fun <reified T : Any?> foo4(t: T) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class B : Java1 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java1*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class C : Java1 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java1*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo2() {
|
||||
}
|
||||
|
||||
override suspend fun foo3() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
suspend fun test(b: B, c: C) {
|
||||
b.foo()
|
||||
b.foo2()
|
||||
b.foo3()
|
||||
b.foo4<Int>(t = 1)
|
||||
c.foo()
|
||||
c.foo2()
|
||||
c.foo3()
|
||||
c.foo4<String>(t = "")
|
||||
}
|
||||
Reference in New Issue
Block a user