14b1a3a048
RuntimeTypeMapper assumed that JavaPropertyDescriptor was necessarily backed by JavaField, which has changed when we started to load Java method (or a pair of methods) overriding a Kotlin property as a property, not as a method. Another example of this situation is special built-in properties which are mapped to Java methods, e.g. java.util.Collection#size() <-> kotlin.Collection#size. This change adds support for the case of a property backed by a JavaMethod. Note that callable references or usage of any reflection API related to built-in members is not supported anyway and will currently fail with errors #KT-11258 Fixed
22 lines
481 B
Kotlin
Vendored
22 lines
481 B
Kotlin
Vendored
// FULL_JDK
|
|
// See KT-11258 Incorrect resolution sequence for Java field
|
|
|
|
import java.util.*
|
|
|
|
fun box(): String {
|
|
listOf(
|
|
ArrayList::class,
|
|
LinkedList::class,
|
|
AbstractList::class,
|
|
HashSet::class,
|
|
TreeSet::class,
|
|
HashMap::class,
|
|
TreeMap::class,
|
|
AbstractMap::class,
|
|
AbstractMap.SimpleEntry::class
|
|
).map {
|
|
it.members.map(Any::toString)
|
|
}
|
|
return "OK"
|
|
}
|