Bridges (#240)
* - 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
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user