Deserialize repeated annotations inside implicit container

#KT-49651 Fixed
This commit is contained in:
Alexander Udalov
2021-11-18 01:11:48 +01:00
parent 6cae6dc5e0
commit 1b5e3f5d51
9 changed files with 128 additions and 5 deletions
@@ -0,0 +1,22 @@
// FULL_JDK
package test
@java.lang.annotation.Repeatable(Anno.Container::class)
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS)
annotation class Anno(val code: Int) {
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS)
annotation class Container(val value: Array<Anno>)
}
@Anno(1)
@Anno(2)
class Z
@Anno(3)
@Anno(4)
fun f() {}
@Anno(5)
@Anno(6)
typealias S = String
@@ -0,0 +1,20 @@
package test
@test.Anno(code = 3) @test.Anno(code = 4) public fun f(): kotlin.Unit
@java.lang.annotation.Repeatable(value = test.Anno.Container::class) @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS}) public final annotation class Anno : kotlin.Annotation {
/*primary*/ public constructor Anno(/*0*/ code: kotlin.Int)
public final val code: kotlin.Int
public final fun <get-code>(): kotlin.Int
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS}) public final annotation class Container : kotlin.Annotation {
/*primary*/ public constructor Container(/*0*/ value: kotlin.Array<test.Anno>)
public final val value: kotlin.Array<test.Anno>
public final fun <get-value>(): kotlin.Array<test.Anno>
}
}
@test.Anno(code = 1) @test.Anno(code = 2) public final class Z {
/*primary*/ public constructor Z()
}
@test.Anno(code = 5) @test.Anno(code = 6) public typealias S = kotlin.String
@@ -0,0 +1,17 @@
package test
@Repeatable
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS)
annotation class Anno(val code: Int)
@Anno(1)
@Anno(2)
class Z
@Anno(3)
@Anno(4)
fun f() {}
@Anno(5)
@Anno(6)
typealias S = String
@@ -0,0 +1,14 @@
package test
@test.Anno(code = 3) @test.Anno(code = 4) public fun f(): kotlin.Unit
@kotlin.annotation.Repeatable @kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS}) public final annotation class Anno : kotlin.Annotation {
/*primary*/ public constructor Anno(/*0*/ code: kotlin.Int)
public final val code: kotlin.Int
public final fun <get-code>(): kotlin.Int
}
@test.Anno(code = 1) @test.Anno(code = 2) public final class Z {
/*primary*/ public constructor Z()
}
@test.Anno(code = 5) @test.Anno(code = 6) public typealias S = kotlin.String