Support reflection tests on Android
This commit is contained in:
+2
-1
@@ -1,6 +1,7 @@
|
||||
// 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() {
|
||||
@@ -9,7 +10,7 @@ object Obj {
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
val klass = Class.forName("Obj\$Inner")!!
|
||||
val klass = Obj.Inner::class.java
|
||||
val cons = klass.getConstructors()!![0]
|
||||
val inner = cons.newInstance(*(arrayOfNulls<String>(0) as Array<String>))
|
||||
return "OK"
|
||||
|
||||
Reference in New Issue
Block a user