IC Mangling: Generate inline class literal instead of underlying type

literal in annotations.
 #KT-30280 Fixed
This commit is contained in:
Ilmir Usmanov
2020-12-29 07:59:29 +01:00
parent 55a5695fc0
commit 80289e4a3f
7 changed files with 44 additions and 1 deletions
@@ -0,0 +1,16 @@
// 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
}