[orx-panel] Fix watchHash for Kotlin 1.4

This commit is contained in:
Edwin Jakobs
2020-08-18 10:02:55 +02:00
parent 99c6e603ef
commit 7b70ae4c90

View File

@@ -7,7 +7,7 @@ import kotlin.reflect.full.declaredMemberProperties
fun watchHash(toHash: Any): Int {
var hash = 0
for (property in toHash::class.declaredMemberProperties) {
val v = ((property.getter) as KProperty1<Any, Any>).invoke(toHash)
val v = ((property as KProperty1<Any, Any?>).getter).invoke(toHash)
if (v is KProperty0<*>) {
val pv = v.get()
hash = 31 * hash + (pv?.hashCode() ?: 0)