mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
12 lines
347 B
Kotlin
Vendored
12 lines
347 B
Kotlin
Vendored
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" |