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,24 @@
|
||||
abstract class A<in T> {
|
||||
abstract fun foo(x: T)
|
||||
}
|
||||
|
||||
class B : A<Int>() {
|
||||
override fun foo(x: Int) {
|
||||
println("B: $x")
|
||||
}
|
||||
}
|
||||
|
||||
class C : A<Any>() {
|
||||
override fun foo(x: Any) {
|
||||
println("C: $x")
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(arg: A<Int>) {
|
||||
arg.foo(42)
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
foo(B())
|
||||
foo(C())
|
||||
}
|
||||
Reference in New Issue
Block a user