Files
kotlin/compiler/testData/codegen/boxWithJava/annotationsWithKClass/basic/basic.kt
Mikhail Glukhikh eab288bdd7 annotation() now has no arguments. Syntax migration to Retention / Repeatable / MustBeDocumented combination
Deprecated test for annotation(params) completion deleted. A lot of tests changed.
2015-09-04 19:21:12 +03:00

10 lines
248 B
Kotlin
Vendored

import kotlin.reflect.KClass
@Retention(AnnotationRetention.RUNTIME)
annotation class Ann(val arg: KClass<*>)
fun box(): String {
val argName = javaClass<Test>().getAnnotation(javaClass<Ann>()).arg.simpleName ?: "fail 1"
return argName
}