ExperimentalReflectionOnLambdas
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPEALIAS] )
This annotation marks the experimental kotlin-reflect API that allows to approximate a Kotlin lambda or a function expression instance to a KFunction instance. The behavior of this API may be changed or the API may be removed completely in any further release.
Any usage of a declaration annotated with @ExperimentalReflectionOnLambdas
should be accepted either by annotating that usage with the OptIn annotation, e.g. @OptIn(ExperimentalReflectionOnLambdas::class)
, or by using the compiler argument -opt-in=kotlin.reflect.jvm.ExperimentalReflectionOnLambdas
.