[K2] Support serialization of complex annotations

#KT-57611 Fixed
This commit is contained in:
Ivan Kylchik
2023-03-31 17:52:07 +02:00
committed by Space Team
parent 4a50bd9b16
commit ac480e2285
17 changed files with 328 additions and 11 deletions
@@ -0,0 +1,31 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// MODULE: lib
// FILE: lib.kt
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
annotation class Annotation(val str: String)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
annotation class AnnotationWithAnnotation(val anno: Annotation)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
annotation class AnnotationWithAnnotationWithAnnotation(val anno: AnnotationWithAnnotation)
@AnnotationWithAnnotation(Annotation("Str" + "ing"))
class A
@AnnotationWithAnnotationWithAnnotation(AnnotationWithAnnotation(Annotation("Str" + "ing")))
class B
// MODULE: main
// FILE: main.kt
fun box(): String {
return "OK"
}