Prevent a crash when using a 'val' with a parameter annotation...

It tried to cast an immutable to a mutable property...
This commit is contained in:
Rein van der Woerd
2020-03-12 22:21:03 +01:00
parent 6e83f0551a
commit c8605f7f53

View File

@@ -125,6 +125,7 @@ class Parameter(
fun Any.listParameters(): List<Parameter> {
return (this::class.memberProperties.filter {
!it.isConst &&
it is KMutableProperty1<*, *> &&
it.visibility == KVisibility.PUBLIC &&
it.annotations.map { it.annotationClass }.intersect(ParameterType.parameterAnnotationClasses).isNotEmpty()
}.map {