Generate IR for annotation class constructors.

This commit is contained in:
Pavel Kunyavskiy
2021-09-14 19:09:12 +03:00
committed by Space
parent 773c82ae48
commit a40022efcd
100 changed files with 743 additions and 244 deletions
@@ -1,15 +1,25 @@
package ann
annotation class Test1<T : Any?> : Annotation {
constructor(x: Int) /* primary */
open annotation class Test1<T : Any?> : Annotation {
constructor(x: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Int
field = x
get
}
annotation class Test2<T1 : Any, T2 : Any?> : Annotation {
constructor(x: Int = 0) /* primary */
open annotation class Test2<T1 : Any, T2 : Any?> : Annotation {
constructor(x: Int = 0) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Int
field = x
get
@@ -20,8 +30,13 @@ interface I<T : Any?> {
}
annotation class Test3<T1 : Any?, T2 : I<T1>> : Annotation {
constructor(x: Test1<I<T2>>) /* primary */
open annotation class Test3<T1 : Any?, T2 : I<T1>> : Annotation {
constructor(x: Test1<I<T2>>) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Test1<I<T2>>
field = x
get
@@ -37,8 +52,13 @@ class C<T : Any?> : I<T> {
}
annotation class Test4 : Annotation {
constructor(x: Array<Test3<Int, C<Int>>>) /* primary */
open annotation class Test4 : Annotation {
constructor(x: Array<Test3<Int, C<Int>>>) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Array<Test3<Int, C<Int>>>
field = x
get
@@ -54,8 +74,13 @@ class ARG {
}
annotation class Test5<T : Any?> : Annotation {
constructor(vararg xs: Test3<T, C<T>>) /* primary */
open annotation class Test5<T : Any?> : Annotation {
constructor(vararg xs: Test3<T, C<T>>) /* primary */ {
super/*Any*/()
/* <init>() */
}
val xs: Array<out Test3<T, C<T>>>
field = xs
get
@@ -75,4 +100,3 @@ class CC {
}
}