Fix supertypes for reflected Java classes, always include j.l.Object

equals/hashCode/toString had not appeared in Java classes' "members" because of
this
This commit is contained in:
Alexander Udalov
2015-07-30 21:02:26 +03:00
parent af9ae46f9a
commit d1e67805fc
4 changed files with 30 additions and 8 deletions

View File

@@ -0,0 +1,12 @@
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"
}