Files
kotlin-fork/backend.native/tests/external/codegen/blackbox/classes/classObjectsWithParentClasses.kt
T
Ilya Matveev 1b553ebfaf backend/tests: Add blackbox tests from Kotlin JVM
Added tests from testData/codegen/box directory. There are blackbox tests
in other directories and they are to be added.
2017-01-20 14:04:04 +03:00

12 lines
347 B
Kotlin

open class Test {
companion object {
fun testStatic(ic: InnerClass): NotInnerClass = NotInnerClass(ic.value)
}
fun test(): InnerClass = InnerClass(150)
inner open class InnerClass(val value: Int)
open class NotInnerClass(val value: Int)
}
fun box() = if (Test.testStatic(Test().test()).value == 150) "OK" else "FAIL"