Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/kclassInAnnotation.kt
T
Ilmir Usmanov 80289e4a3f IC Mangling: Generate inline class literal instead of underlying type
literal in annotations.
 #KT-30280 Fixed
2020-12-30 03:31:08 +01:00

16 lines
304 B
Kotlin
Vendored

// WITH_REFLECT
// TARGET_BACKEND: JVM
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 IC") "OK" else klass
}