c746da3ce4
* - bridges building - bridges support in vtable and methods table * FunctionDescriptor.signature fix + some assertions * tests * refactoring * refactoring * removed debug output * refactoring * review fixes * implemented bridge construction for parameters * tests * refactoring * removed custom box/unbox * added bridge for extension receiver
27 lines
434 B
Kotlin
27 lines
434 B
Kotlin
// abstract class vtable call
|
|
abstract class A {
|
|
abstract fun foo(): String
|
|
}
|
|
|
|
abstract class B : A()
|
|
|
|
class Z : B() {
|
|
override fun foo() = "Z"
|
|
}
|
|
|
|
|
|
fun box(): String {
|
|
val z = Z()
|
|
val b: B = z
|
|
val a: A = z
|
|
return when {
|
|
z.foo() != "Z" -> "Fail #1"
|
|
b.foo() != "Z" -> "Fail #2"
|
|
a.foo() != "Z" -> "Fail #3"
|
|
else -> "OK"
|
|
}
|
|
}
|
|
|
|
fun main(args: Array<String>) {
|
|
println(box())
|
|
} |