Files
kotlin/compiler/testData/codegen/box/objects/nestedObjectWithSuperclass.kt
2019-11-19 11:00:09 +03:00

19 lines
339 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
open class A (val s: Int) {
open fun foo(): Int {
return s
}
}
object Outer: A(1) {
object O: A(2) {
override fun foo(): Int {
val s = super<A>.foo()
return s + 3
}
}
}
fun box() : String {
return if (Outer.O.foo() == 5) "OK" else "fail"
}