Files
kotlin-fork/idea/testData/codegen/classes/rightHandOverride.jet
T
2011-06-15 18:00:22 +04:00

18 lines
285 B
Plaintext

class Left() {}
class Right() {
virtual fun f() = 42
}
class D() : Left(), Right() {
override fun f() = 239
}
fun box() : String {
val r : Right = Right()
val d : D = D()
if (r.f() != 42) return "Fail #1"
if (d.f() != 239) return "Fail #2"
return "OK"
}