Deprecate kotlin.reflect.findAnnotation with ERROR

This commit is contained in:
Alexander Udalov
2017-02-07 17:38:55 +03:00
parent 5987e8a47c
commit cfe159181d
2 changed files with 2 additions and 2 deletions
@@ -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")