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