From c8605f7f53769797493f206636784027c378bb2d Mon Sep 17 00:00:00 2001 From: Rein van der Woerd Date: Thu, 12 Mar 2020 22:21:03 +0100 Subject: [PATCH] Prevent a crash when using a 'val' with a parameter annotation... It tried to cast an immutable to a mutable property... --- orx-parameters/src/main/kotlin/Annotations.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/orx-parameters/src/main/kotlin/Annotations.kt b/orx-parameters/src/main/kotlin/Annotations.kt index 8653fb2a..5353647e 100644 --- a/orx-parameters/src/main/kotlin/Annotations.kt +++ b/orx-parameters/src/main/kotlin/Annotations.kt @@ -125,6 +125,7 @@ class Parameter( fun Any.listParameters(): List { return (this::class.memberProperties.filter { !it.isConst && + it is KMutableProperty1<*, *> && it.visibility == KVisibility.PUBLIC && it.annotations.map { it.annotationClass }.intersect(ParameterType.parameterAnnotationClasses).isNotEmpty() }.map {