I'm trying to migrate to new RC version of Kotlin and found strange situation when eliminating deprecation warnings about .javaClass using.
My code was:
val memberProperties: Collection<KProperty1> = entity.javaClass.kotlin.memberProperties`
When I've changed it to:
val memberProperties: Collection<KProperty1> = entity::class.java.kotlin.memberProperties
Error:(110, 89) Kotlin: Type inference failed. Expected type mismatch: inferred type is Collection<KProperty1<out T, Any?>> but Collection<KProperty1<T, *>> was expected
If I change type of my
Collection<KProperty1<out T, *>> - it compiles, but I can't use elements of collection as:
But by ctrl+click to
memberProperties in both variants they both have type of
How to migrate this place?