basically, what I'd like to do is: ```val klass=el...
# announcements
d
basically, what I'd like to do is:
Copy code
val klass=elt::klass
klass.memberProperties.map { prop -> /* something here */ },joinToString()
- I just can't figure out what belongs in
something here
such that the property is extracted from
elt
prop.get(elt)
d
That gives me a compiler error:
Copy code
Error:(80, 53) Kotlin: Out-projected type 'KProperty1<out Any, Any?>' prohibits the use of 'public abstract fun get(receiver: T): R defined in kotlin.reflect.KProperty1'
d
Yes, this is something the compiler can't prove is correct. You need an unchecked cast.
d
... I'm not even sure what the cast would look like
d
(prop as KProperty1<Any, Any?>).get(elt)
🤯 1
d
trying. That compiles, at least!
Okay, there are some other issues here, will chase them. Thank you VERY much!