Analysis API: add test for annotations on types

This commit is contained in:
Ilya Kirillov
2021-11-18 19:23:50 +01:00
parent 193df3e3c4
commit a084ad59de
23 changed files with 300 additions and 1 deletions
@@ -0,0 +1,6 @@
@Target(AnnotationTarget.TYPE)
annotation class TypeAnnotation
fun x(): @TypeAnnotation Li<caret>st<Int> {
TODO()
}
@@ -0,0 +1,5 @@
KtTypeReference: @TypeAnnotation List<Int>
annotations: [
TypeAnnotation()
psi: KtAnnotationEntry
]
@@ -0,0 +1,6 @@
@Target(AnnotationTarget.TYPE)
annotation class TypeAnnotation
fun x(): List<@TypeAnnotation In<caret>t> {
TODO()
}
@@ -0,0 +1,5 @@
KtTypeReference: @TypeAnnotation Int
annotations: [
TypeAnnotation()
psi: KtAnnotationEntry
]
@@ -0,0 +1,6 @@
@Target(AnnotationTarget.TYPE)
annotation class TypeAnnotation
fun x(): List<MutableList<@TypeAnnotation I<caret>nt>> {
TODO()
}
@@ -0,0 +1,5 @@
KtTypeReference: @TypeAnnotation Int
annotations: [
TypeAnnotation()
psi: KtAnnotationEntry
]
@@ -0,0 +1,6 @@
@Target(AnnotationTarget.TYPE)
annotation class TypeAnnotation(val value: Int)
fun x(): @TypeAnnotation(1 + 1) Li<caret>st<Int> {
TODO()
}
@@ -0,0 +1,5 @@
KtTypeReference: @TypeAnnotation(1 + 1) List<Int>
annotations: [
TypeAnnotation(value = 2)
psi: KtAnnotationEntry
]
@@ -0,0 +1,6 @@
@Target(AnnotationTarget.TYPE)
annotation class TypeAnnotation(val value: Int)
fun x(): MutableList<@TypeAnnotation(1 + 1) L<caret>ist<Int>> {
TODO()
}
@@ -0,0 +1,5 @@
KtTypeReference: @TypeAnnotation(1 + 1) List<Int>
annotations: [
TypeAnnotation(value = 2)
psi: KtAnnotationEntry
]
@@ -0,0 +1,6 @@
@Target(AnnotationTarget.TYPE)
annotation class TypeAnnotation(val value: Int)
fun x(): @TypeAnnotation(1) Li<caret>st<Int> {
TODO()
}
@@ -0,0 +1,5 @@
KtTypeReference: @TypeAnnotation(1) List<Int>
annotations: [
TypeAnnotation(value = 1)
psi: KtAnnotationEntry
]
@@ -0,0 +1,6 @@
@Target(AnnotationTarget.TYPE)
annotation class TypeAnnotation(val value: Int)
fun x(): List<@TypeAnnotation(1) I<caret>nt> {
TODO()
}
@@ -0,0 +1,5 @@
KtTypeReference: @TypeAnnotation(1) Int
annotations: [
TypeAnnotation(value = 1)
psi: KtAnnotationEntry
]