Promote KClass.cast/safeCast, KAnnotatedElement.hasAnnotation() to stable

This commit is contained in:
Abduqodiri Qurbonzoda
2020-06-01 19:09:00 +03:00
parent a4b9e8fdc6
commit e3fb74b656
2 changed files with 7 additions and 6 deletions
@@ -20,7 +20,8 @@ inline fun <reified T : Annotation> KAnnotatedElement.findAnnotation(): T? =
/**
* Returns true if this element is annotated with an annotation of type [T].
*/
@ExperimentalStdlibApi
@SinceKotlin("1.3")
@SinceKotlin("1.4")
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
@WasExperimental(ExperimentalStdlibApi::class)
inline fun <reified T : Annotation> KAnnotatedElement.hasAnnotation(): Boolean =
findAnnotation<T>() != null