Deprecate kotlin.reflect.findAnnotation with ERROR
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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<T>()", "kotlin.reflect.full.findAnnotation"), level = DeprecationLevel.WARNING)
|
||||
@Deprecated("Use 'findAnnotation' from kotlin.reflect.full package", ReplaceWith("this.findAnnotation<T>()", "kotlin.reflect.full.findAnnotation"), level = DeprecationLevel.ERROR)
|
||||
@SinceKotlin("1.1")
|
||||
inline fun <reified T : Annotation> KAnnotatedElement.findAnnotation(): T? =
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
|
||||
Reference in New Issue
Block a user