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,20 @@
|
||||
interface I {
|
||||
fun foo(x: Int)
|
||||
}
|
||||
|
||||
abstract class A<T> {
|
||||
abstract fun foo(x: T)
|
||||
}
|
||||
|
||||
class B : A<Int>(), I {
|
||||
override fun foo(x: Int) = println(x)
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val b = B()
|
||||
val a: A<Int> = b
|
||||
val c: I = b
|
||||
b.foo(42)
|
||||
a.foo(42)
|
||||
c.foo(42)
|
||||
}
|
||||
Reference in New Issue
Block a user