Files
kotlin-fork/compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt
T
2019-11-19 11:00:09 +03:00

19 lines
303 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
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"
}