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
28 lines
363 B
Kotlin
28 lines
363 B
Kotlin
open class A<T> {
|
|
open fun foo(x: T) {
|
|
println(x.toString())
|
|
}
|
|
}
|
|
|
|
interface I {
|
|
fun foo(x: Int)
|
|
}
|
|
|
|
class B : A<Int>(), I {
|
|
var z: Int = 5
|
|
override fun foo(x: Int) {
|
|
z = x
|
|
}
|
|
}
|
|
|
|
fun zzz(a: A<Int>) {
|
|
a.foo(42)
|
|
}
|
|
|
|
fun main(args: Array<String>) {
|
|
val b = B()
|
|
zzz(b)
|
|
val a = A<Int>()
|
|
zzz(a)
|
|
println(b.z)
|
|
} |