Files
kotlin-fork/native/native.tests/testData/codegen/innerClass/inheritanceMultipleModules1.kt
T
2024-01-02 18:47:05 +00:00

25 lines
387 B
Kotlin
Vendored

// MODULE: lib
// FILE: lib.kt
open class Foo(val z: Int) {
open inner class FooInner {
fun foo() = z
}
}
// MODULE: main(lib)
// FILE: main.kt
import kotlin.test.*
class Bar : Foo(42) {
inner class BarInner(val x: Int) : FooInner()
}
fun box(): String {
val o = Bar().BarInner(117)
assertEquals(117, o.x)
assertEquals(42, o.foo())
return "OK"
}