FIR IDE: test resolution of various annotation values
This commit is contained in:
committed by
Ilya Kirillov
parent
150f066254
commit
744961bd00
@@ -0,0 +1,6 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationInner(val value: Annotation)
|
||||
|
||||
<expr>@AnnotationInner(Annotation("v1", "v2"))</expr>
|
||||
class C
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
KtAnnotationCall:
|
||||
argumentMapping = { Annotation("v1", "v2") -> (value: Annotation) }
|
||||
targetFunction = <constructor>(value: Annotation): AnnotationInner
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationInner(val value: Annotation)
|
||||
|
||||
@AnnotationInner(<expr>Annotation(strings = arrayOf("v1", "v2"))</expr>)
|
||||
class C
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { arrayOf("v1", "v2") -> (vararg strings: kotlin.String) }
|
||||
targetFunction = <constructor>(vararg strings: kotlin.String): Annotation
|
||||
substitutor = <empty substitutor>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationInner(val value: Annotation)
|
||||
|
||||
@AnnotationInner(<expr>Annotation(["v1", "v2"])</expr>)
|
||||
class C
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { ["v1", "v2"] -> (vararg strings: kotlin.String) }
|
||||
targetFunction = <constructor>(vararg strings: kotlin.String): Annotation
|
||||
substitutor = <empty substitutor>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationArray(vararg val annos: Annotation)
|
||||
|
||||
@AnnotationArray(<expr>annos = arrayOf(Annotation("v1", "v2"), Annotation(strings = arrayOf("v3", "v4")))</expr>)
|
||||
class C
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { Annotation("v1", "v2") -> (vararg elements: Annotation), Annotation(strings = arrayOf("v3", "v4")) -> (vararg elements: Annotation) }
|
||||
targetFunction = kotlin/arrayOf(vararg elements: Annotation): kotlin.Array<Annotation>
|
||||
substitutor = <map substitutor: {FirTypeParameterSymbol T=Annotation}>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationArray(vararg val annos: Annotation)
|
||||
|
||||
<expr>@AnnotationArray([Annotation("v1", "v2"), Annotation(["v3", "v4"])])</expr>
|
||||
class C
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
KtAnnotationCall:
|
||||
argumentMapping = { [Annotation("v1", "v2"), Annotation(["v3", "v4"])] -> (vararg annos: Annotation) }
|
||||
targetFunction = <constructor>(vararg annos: Annotation): AnnotationArray
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationInner(val value: Annotation)
|
||||
|
||||
@AnnotationInner(<expr>Annotation()</expr>)
|
||||
class C
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = <constructor>(vararg strings: kotlin.String): Annotation
|
||||
substitutor = <empty substitutor>
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationInner(val value: Annotation)
|
||||
|
||||
@AnnotationInner(<expr>Annotation("v1", "v2")</expr>)
|
||||
class C
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { "v1" -> (vararg strings: kotlin.String), "v2" -> (vararg strings: kotlin.String) }
|
||||
targetFunction = <constructor>(vararg strings: kotlin.String): Annotation
|
||||
substitutor = <empty substitutor>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
enum class Color {
|
||||
R,
|
||||
G,
|
||||
B
|
||||
}
|
||||
|
||||
annotation class Annotation(val color : Color)
|
||||
|
||||
<expr>@Annotation(Color.R)</expr>
|
||||
class C
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
KtAnnotationCall:
|
||||
argumentMapping = { Color.R -> (color: Color) }
|
||||
targetFunction = <constructor>(color: Color): Annotation
|
||||
Reference in New Issue
Block a user