Files
kotlin/compiler/testData/codegen/boxWithJava/reflection/javaClassGetFunctions/K.kt
Alexander Udalov d1e67805fc Fix supertypes for reflected Java classes, always include j.l.Object
equals/hashCode/toString had not appeared in Java classes' "members" because of
this
2015-08-03 23:06:15 +03:00

13 lines
527 B
Kotlin
Vendored

import kotlin.reflect.*
import kotlin.test.assertEquals
fun box(): String {
assertEquals(listOf("equals", "hashCode", "member", "staticMethod", "toString"), J::class.members.map { it.name }.toSortedList())
assertEquals(listOf("equals", "hashCode", "member", "staticMethod", "toString"), J::class.functions.map { it.name }.toSortedList())
assertEquals(listOf("member", "staticMethod"), J::class.declaredFunctions.map { it.name }.toSortedList())
assertEquals(1, J::class.constructors.size())
return "OK"
}