blob: d1f8271dffd8b49922bb0a4eb04195ea6a94aa04 [file]
// WITH_STDLIB
import kotlin.test.*
// interface call, bridge overridden
interface Z1 {
fun foo(x: Int) : Any
}
open class A : Z1 {
override fun foo(x: Int) : Int = 5
}
open class B : A() {
override fun foo(x: Int) : Int = 42
}
fun box(): String {
val z1: A = B()
val res = (z1.foo(1) + 1000).toString()
if (res != "1042") return "FAIL: $res"
return "OK"
}