Files
kotlin-fork/backend.native/tests/codegen/bridges/test10.kt
T
Igor Chevdar c746da3ce4 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
2017-02-16 15:26:57 +05:00

28 lines
363 B
Kotlin

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)
}