diff --git a/compiler/testData/codegen/box/reflection/annotations/findAnnotation.kt b/compiler/testData/codegen/box/reflection/annotations/findAnnotation.kt index 38db10486b4..38daa99c5f1 100644 --- a/compiler/testData/codegen/box/reflection/annotations/findAnnotation.kt +++ b/compiler/testData/codegen/box/reflection/annotations/findAnnotation.kt @@ -1,7 +1,7 @@ // IGNORE_BACKEND: JS // WITH_REFLECT -import kotlin.reflect.findAnnotation +import kotlin.reflect.full.findAnnotation import kotlin.test.assertNull annotation class Yes(val value: String) diff --git a/core/reflection.jvm/src/kotlin/reflect/KAnnotatedElements.kt b/core/reflection.jvm/src/kotlin/reflect/KAnnotatedElements.kt index 70501e59d4f..9837224636a 100644 --- a/core/reflection.jvm/src/kotlin/reflect/KAnnotatedElements.kt +++ b/core/reflection.jvm/src/kotlin/reflect/KAnnotatedElements.kt @@ -22,7 +22,7 @@ package kotlin.reflect * Returns an annotation of the given type on this element. */ @kotlin.internal.LowPriorityInOverloadResolution -@Deprecated("Use 'findAnnotation' from kotlin.reflect.full package", ReplaceWith("this.findAnnotation()", "kotlin.reflect.full.findAnnotation"), level = DeprecationLevel.WARNING) +@Deprecated("Use 'findAnnotation' from kotlin.reflect.full package", ReplaceWith("this.findAnnotation()", "kotlin.reflect.full.findAnnotation"), level = DeprecationLevel.ERROR) @SinceKotlin("1.1") inline fun KAnnotatedElement.findAnnotation(): T? = @Suppress("UNCHECKED_CAST")