mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
12 lines
273 B
Kotlin
Vendored
12 lines
273 B
Kotlin
Vendored
import kotlin.reflect.KClass
|
|
import java.lang.annotation.*
|
|
|
|
Retention(RetentionPolicy.RUNTIME)
|
|
annotation
|
|
class Ann(val arg: KClass<*>)
|
|
|
|
fun box(): String {
|
|
val argName = javaClass<Test>().getAnnotation(javaClass<Ann>()).arg.simpleName ?: "fail 1"
|
|
return argName
|
|
}
|