mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 08:31:26 +00:00
17 lines
322 B
Kotlin
Vendored
17 lines
322 B
Kotlin
Vendored
// WITH_REFLECT
|
|
// TARGET_BACKEND: JVM
|
|
package test
|
|
|
|
import kotlin.reflect.KClass
|
|
|
|
inline class IC(val i: Int)
|
|
|
|
annotation class Ann(val c: KClass<*>)
|
|
|
|
@Ann(IC::class)
|
|
class C
|
|
|
|
fun box(): String {
|
|
val klass = (C::class.annotations.first() as Ann).c.toString()
|
|
return if (klass == "class test.IC") "OK" else klass
|
|
} |