Files
Ting-Yuan Huang 6c989bfd4b Support array of annotation in KotlinJvmBinaryClass
KotlinJvmBinaryClass.AnnotationArrayArgumentVisitor didn't cover the
case when the element type is an Annotation. Therefore, when the
compiler read an array of annotations from JVM binary classes built from
Kotlin sources, it got an empty array regardless of what was written in
the bytecode.

For example, Foo.value below is read as an empty array when SomeClass
resides in another Kotlin module.

  @Foo(
    value = [Bar(1), Bar(2)]
  )
  class SomeClass
2021-04-14 13:14:26 +02:00

17 lines
211 B
Kotlin
Vendored

// ALLOW_AST_ACCESS
package test
annotation class Anno(
val value: Array<Bnno>
)
annotation class Bnno(
val value: String
)
@Anno(
value = [Bnno("x"), Bnno("y")]
)
public class AnnotationInArray