Delete kotlin.jvm.internal.KObject

It was supposed to be used in reflection but the benefits do not outweigh the
cost of KT-6951

 #KT-3223 Fixed
 #KT-6951 Fixed
This commit is contained in:
Alexander Udalov
2015-03-12 14:05:42 +03:00
parent e5d5b49ce2
commit 8af6ca5279
29 changed files with 34 additions and 122 deletions
@@ -1,7 +1,5 @@
// KT-4485 getGenericInterfaces vs getInterfaces for kotlin classes
import kotlin.jvm.internal.KObject
class SimpleClass
class ClassWithNonGenericSuperInterface: Cloneable
@@ -10,10 +8,6 @@ class ClassWithGenericSuperInterface: java.util.Comparator<String> {
override fun compare(a: String, b: String): Int = 0
}
class ExplicitKObject: java.util.Comparator<String>, KObject {
override fun compare(a: String, b: String): Int = 0
}
fun check(klass: Class<*>) {
val interfaces = klass.getInterfaces().toList()
val genericInterfaces = klass.getGenericInterfaces().toList()
@@ -26,6 +20,5 @@ fun box(): String {
check(javaClass<SimpleClass>())
check(javaClass<ClassWithNonGenericSuperInterface>())
check(javaClass<ClassWithGenericSuperInterface>())
check(javaClass<ExplicitKObject>())
return "OK"
}