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:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user