Test kotlin-repeatable annotations on Android
(except for type-use annotations)
This commit is contained in:
+1
-7
@@ -4,9 +4,6 @@
|
||||
// FULL_JDK
|
||||
// WITH_REFLECT
|
||||
|
||||
// Test failed to run to completion. Reason: 'Instrumentation run failed due to 'Native crash''. Check device logcat for details
|
||||
// IGNORE_BACKEND: ANDROID
|
||||
|
||||
import kotlin.annotation.AnnotationTarget.*
|
||||
import kotlin.reflect.KAnnotatedElement
|
||||
import kotlin.reflect.full.findAnnotation
|
||||
@@ -30,7 +27,7 @@ fun check(element: KAnnotatedElement) {
|
||||
}
|
||||
|
||||
@Repeatable
|
||||
@Target(CLASS, FUNCTION, PROPERTY, TYPE)
|
||||
@Target(CLASS, FUNCTION, PROPERTY)
|
||||
annotation class A(val value: String)
|
||||
|
||||
@A("O") @A("") @A("K")
|
||||
@@ -42,12 +39,9 @@ var p = 1
|
||||
@A("O") @A("K")
|
||||
class Z
|
||||
|
||||
fun g(): @A("O") @A("K") @A("") Unit {}
|
||||
|
||||
fun box(): String {
|
||||
check(::f)
|
||||
check(::p)
|
||||
check(Z::class)
|
||||
check(::g.returnType)
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user