[orx-parameters] Clean up warnings
This commit is contained in:
@@ -18,7 +18,7 @@ fun Any.listParameters(): List<Parameter> {
|
|||||||
!property.isConst &&
|
!property.isConst &&
|
||||||
property is KMutableProperty1<*, *> &&
|
property is KMutableProperty1<*, *> &&
|
||||||
property.visibility == KVisibility.PUBLIC &&
|
property.visibility == KVisibility.PUBLIC &&
|
||||||
property.annotations.map { it.annotationClass }.intersect(ParameterType.parameterAnnotationClasses).isNotEmpty()
|
property.annotations.map { it.annotationClass }.intersect(ParameterType.parameterAnnotationClasses.toSet()).isNotEmpty()
|
||||||
}.map { property ->
|
}.map { property ->
|
||||||
val annotations = property.annotations.filter { it.annotationClass in ParameterType.parameterAnnotationClasses }
|
val annotations = property.annotations.filter { it.annotationClass in ParameterType.parameterAnnotationClasses }
|
||||||
var intRange: IntRange? = null
|
var intRange: IntRange? = null
|
||||||
@@ -108,6 +108,7 @@ fun Any.listParameters(): List<Parameter> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
Parameter(
|
Parameter(
|
||||||
parameterType = type ?: error("no type"),
|
parameterType = type ?: error("no type"),
|
||||||
property = property as KMutableProperty1<out Any, Any?>,
|
property = property as KMutableProperty1<out Any, Any?>,
|
||||||
@@ -134,6 +135,7 @@ fun Any.listParameters(): List<Parameter> {
|
|||||||
val label = annotation.label
|
val label = annotation.label
|
||||||
val order = annotation.order
|
val order = annotation.order
|
||||||
val type = ParameterType.Action
|
val type = ParameterType.Action
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
Parameter(
|
Parameter(
|
||||||
type,
|
type,
|
||||||
property = null,
|
property = null,
|
||||||
|
|||||||
Reference in New Issue
Block a user