Files
kotlin/compiler/testData/codegen/box/objects/nestedObjectWithSuperclass.kt
2013-11-26 17:29:59 +04:00

18 lines
309 B
Kotlin
Vendored

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"
}