Files
kotlin-fork/backend.native/tests/codegen/bridges/test11.kt
T
2017-10-20 18:25:05 +03:00

24 lines
332 B
Kotlin

package codegen.bridges.test11
import kotlin.test.*
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)
}
@Test fun runTest() {
val b = B()
val a: A<Int> = b
val c: I = b
b.foo(42)
a.foo(42)
c.foo(42)
}