Files
kotlin-fork/compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt
T
2015-10-12 11:11:23 +02:00

18 lines
273 B
Kotlin
Vendored

interface A {
fun foo(): Any = "A"
}
interface B : A {
override fun foo(): String = "B"
}
class C : B
fun box(): String {
val c = C()
val b: B = c
val a: A = c
var r = c.foo() + b.foo() + a.foo()
return if (r == "BBB") "OK" else "Fail: $r"
}