mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
Support mapping of KType to j.l.reflect.Type
This commit is contained in:
12
compiler/testData/codegen/boxWithJava/reflection/callStaticJavaMethod/K.kt
vendored
Normal file
12
compiler/testData/codegen/boxWithJava/reflection/callStaticJavaMethod/K.kt
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import kotlin.reflect.jvm.*
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun box(): String {
|
||||
val f = J::foo
|
||||
assertEquals(listOf(Integer.TYPE, javaClass<IntArray>(), javaClass<Array<Any>>()), f.parameters.map { it.type.javaType })
|
||||
assertEquals(javaClass<String>(), f.returnType.javaType)
|
||||
|
||||
assertEquals("01A", f.call(0, intArrayOf(1), arrayOf("A")))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user