Files
kotlin-fork/compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt
T
Dmitriy Novozhilov 6735cc8937 [FIR] Implement new bound smartcast algorithm
#KT-36055 Fixed
2020-02-12 10:17:45 +03: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"
}