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
19 lines
305 B
Kotlin
19 lines
305 B
Kotlin
// interface call, bridge overridden
|
|
interface Z1 {
|
|
fun foo(x: Int) : Any
|
|
}
|
|
|
|
open class A : Z1 {
|
|
override fun foo(x: Int) : Int = 5
|
|
}
|
|
|
|
open class B : A() {
|
|
override fun foo(x: Int) : Int = 42
|
|
}
|
|
|
|
fun main(args: Array<String>) {
|
|
val z1: A = B()
|
|
println((z1.foo(1) + 1000).toString())
|
|
}
|
|
|