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
24 lines
328 B
Kotlin
24 lines
328 B
Kotlin
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())
|
|
} |