mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
Merge boxWithJava testData into box, delete BoxWithJava test
This commit is contained in:
committed by
Alexander Udalov
parent
16a0ddd2fb
commit
f8dfaf4599
20
compiler/testData/codegen/box/reflection/kClassInAnnotation/basicInJava.kt
vendored
Normal file
20
compiler/testData/codegen/box/reflection/kClassInAnnotation/basicInJava.kt
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
// WITH_RUNTIME
|
||||
// FILE: Test.java
|
||||
|
||||
class OK {}
|
||||
|
||||
@Ann(arg=OK.class)
|
||||
class Test {
|
||||
}
|
||||
|
||||
// FILE: basic.kt
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Ann(val arg: KClass<*>)
|
||||
|
||||
fun box(): String {
|
||||
val argName = Test::class.java.getAnnotation(Ann::class.java).arg.java.simpleName ?: "fail 1"
|
||||
return argName
|
||||
}
|
||||
Reference in New Issue
Block a user