Files
kotlin-fork/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt.txt
T
2024-02-16 10:19:38 +00:00

103 lines
1.7 KiB
Kotlin
Vendored

package ann
open annotation class Test1<T : Any?> : Annotation {
val x: Int
field = x
get
constructor(x: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
}
open annotation class Test2<T1 : Any, T2 : Any?> : Annotation {
val x: Int
field = x
get
constructor(x: Int = 0) /* primary */ {
super/*Any*/()
/* <init>() */
}
}
open annotation class Test3<T1 : Any?, T2 : I<T1>> : Annotation {
val x: Test1<I<T2>>
field = x
get
constructor(x: Test1<I<T2>>) /* primary */ {
super/*Any*/()
/* <init>() */
}
}
open annotation class Test4 : Annotation {
val x: Array<Test3<Int, C<Int>>>
field = x
get
constructor(x: Array<Test3<Int, C<Int>>>) /* primary */ {
super/*Any*/()
/* <init>() */
}
}
open annotation class Test5<T : Any?> : Annotation {
val xs: Array<out Test3<T, C<T>>>
field = xs
get
constructor(vararg xs: Test3<T, C<T>>) /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class ARG {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class C<T : Any?> : I<T> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
@Test1<ARG>(x = 42)
@Test2<String, String>(x = 38)
@Test3<String, C<String>>(x = Test1<I<C<String>>>(x = 39))
@Test4(x = [Test3<Int, C<Int>>(x = Test1<I<C<Int>>>(x = 40)), Test3<Int, C<Int>>(x = Test1<I<C<Int>>>(x = 50)), Test3<Int, C<Int>>(x = Test1<I<C<Int>>>(x = 60))])
@Test5<ARG>(xs = [[Test3<ARG, C<ARG>>(x = Test1<I<C<ARG>>>(x = 70))], [Test3<ARG, C<ARG>>(x = Test1<I<C<ARG>>>(x = 80))]])
class CC {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
interface I<T : Any?> {
}