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

19 lines
440 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// WITH_RUNTIME
object Obj {
class Inner() {
fun ok() = "OK"
}
}
fun box() : String {
val klass = Obj.Inner::class.java
val cons = klass.getConstructors()!![0]
val inner = cons.newInstance(*(arrayOfNulls<String>(0) as Array<String>))
return "OK"
}