Analysis API: add test for annotations on types
This commit is contained in:
+3
@@ -27,6 +27,9 @@ import kotlin.reflect.full.extensionReceiverParameter
|
||||
public object DebugSymbolRenderer {
|
||||
public fun render(symbol: KtSymbol): String = Block().apply { renderSymbol(symbol) }.toString()
|
||||
|
||||
public fun renderAnnotationApplication(application: KtAnnotationApplication): String =
|
||||
Block().apply { renderAnnotationApplication(application) }.toString()
|
||||
|
||||
public fun renderType(type: KtType): String = Block().apply { renderType(type) }.toString()
|
||||
|
||||
public fun KtAnalysisSession.renderExtra(symbol: KtSymbol): String = Block().apply {
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class TypeAnnotation
|
||||
|
||||
fun x(): @TypeAnnotation Li<caret>st<Int> {
|
||||
TODO()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KtTypeReference: @TypeAnnotation List<Int>
|
||||
annotations: [
|
||||
TypeAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class TypeAnnotation
|
||||
|
||||
fun x(): List<@TypeAnnotation In<caret>t> {
|
||||
TODO()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KtTypeReference: @TypeAnnotation Int
|
||||
annotations: [
|
||||
TypeAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class TypeAnnotation
|
||||
|
||||
fun x(): List<MutableList<@TypeAnnotation I<caret>nt>> {
|
||||
TODO()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KtTypeReference: @TypeAnnotation Int
|
||||
annotations: [
|
||||
TypeAnnotation()
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class TypeAnnotation(val value: Int)
|
||||
|
||||
fun x(): @TypeAnnotation(1 + 1) Li<caret>st<Int> {
|
||||
TODO()
|
||||
}
|
||||
analysis/analysis-api/testData/annotations/annotationsOnTypes/annotaionWithComplexArgumentOnType.txt
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
KtTypeReference: @TypeAnnotation(1 + 1) List<Int>
|
||||
annotations: [
|
||||
TypeAnnotation(value = 2)
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class TypeAnnotation(val value: Int)
|
||||
|
||||
fun x(): MutableList<@TypeAnnotation(1 + 1) L<caret>ist<Int>> {
|
||||
TODO()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KtTypeReference: @TypeAnnotation(1 + 1) List<Int>
|
||||
annotations: [
|
||||
TypeAnnotation(value = 2)
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class TypeAnnotation(val value: Int)
|
||||
|
||||
fun x(): @TypeAnnotation(1) Li<caret>st<Int> {
|
||||
TODO()
|
||||
}
|
||||
analysis/analysis-api/testData/annotations/annotationsOnTypes/annotaionWithLiteralArgumentOnType.txt
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
KtTypeReference: @TypeAnnotation(1) List<Int>
|
||||
annotations: [
|
||||
TypeAnnotation(value = 1)
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class TypeAnnotation(val value: Int)
|
||||
|
||||
fun x(): List<@TypeAnnotation(1) I<caret>nt> {
|
||||
TODO()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KtTypeReference: @TypeAnnotation(1) Int
|
||||
annotations: [
|
||||
TypeAnnotation(value = 1)
|
||||
psi: KtAnnotationEntry
|
||||
]
|
||||
Reference in New Issue
Block a user