Support annotation based on descriptor in ultra-light classes

It helps to generate properly the annotations for delegates
Also note in test, that annotations in Base class have really weird
text of arguments and also don't have names
This commit is contained in:
Denis Zharkov
2018-12-05 16:25:03 +03:00
parent 63907b1a6b
commit 2f8b214e76
12 changed files with 263 additions and 5 deletions
@@ -0,0 +1,25 @@
import kotlin.reflect.KClass
/** should load cls */
annotation class SimpleAnn(val value: String)
/** should load cls */
annotation class Ann(
val x: Int,
val y: String,
val z: KClass<*>,
val e: Array<KClass<*>>,
val depr: DeprecationLevel
vararg val t: SimpleAnn
)
interface Base {
@Ann(1, "134", String::class, arrayOf(Int::class, Double::class), DeprecationLevel.WARNING, SimpleAnn("243"), SimpleAnn("4324"))
fun foo(
@Ann(2, "324", Ann::class, arrayOf(Byte::class, Base::class), DeprecationLevel.WARNING, SimpleAnn("687"), SimpleAnn("78")) x: String
)
}
class Derived(b: Base) : Base by b {
}