FIR IDE: more comprehensive abstractions of annotation values
This commit is contained in:
committed by
Ilya Kirillov
parent
fe41c4513f
commit
6ef2dad895
+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
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
expression: Annotation(strings = arrayOf("v1", "v2"))
|
||||
constant_value: KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtSimpleConstantValue(constantValueKind=String, value=v1)
|
||||
KtSimpleConstantValue(constantValueKind=String, value=v2)
|
||||
]))
|
||||
constant: null
|
||||
+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
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
expression: Annotation(["v1", "v2"])
|
||||
constant_value: KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtSimpleConstantValue(constantValueKind=String, value=v1)
|
||||
KtSimpleConstantValue(constantValueKind=String, value=v2)
|
||||
]))
|
||||
constant: null
|
||||
+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
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
expression: arrayOf(Annotation("v1", "v2"), Annotation(strings = arrayOf("v3", "v4")))
|
||||
constant_value: KtArrayConstantValue [
|
||||
KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtSimpleConstantValue(constantValueKind=String, value=v1)
|
||||
KtSimpleConstantValue(constantValueKind=String, value=v2)
|
||||
]))
|
||||
KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtSimpleConstantValue(constantValueKind=String, value=v3)
|
||||
KtSimpleConstantValue(constantValueKind=String, value=v4)
|
||||
]))
|
||||
]
|
||||
constant: null
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationArray(vararg val annos: Annotation)
|
||||
|
||||
@AnnotationArray(<expr>[Annotation("v1", "v2"), Annotation(["v3", "v4"])]</expr>)
|
||||
class C
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
expression: [Annotation("v1", "v2"), Annotation(["v3", "v4"])]
|
||||
constant_value: KtArrayConstantValue [
|
||||
KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtSimpleConstantValue(constantValueKind=String, value=v1)
|
||||
KtSimpleConstantValue(constantValueKind=String, value=v2)
|
||||
]))
|
||||
KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtSimpleConstantValue(constantValueKind=String, value=v3)
|
||||
KtSimpleConstantValue(constantValueKind=String, value=v4)
|
||||
]))
|
||||
]
|
||||
constant: null
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
enum class Color {
|
||||
R,
|
||||
G,
|
||||
B
|
||||
}
|
||||
|
||||
annotation class Annotation(val color : Color)
|
||||
|
||||
@Annotation(<expr>Color.R</expr>)
|
||||
class C
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
expression: Color.R
|
||||
constant_value: KtEnumEntryValue(/Color.R)
|
||||
constant: null
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
annotation class Annotation(vararg val values: String)
|
||||
|
||||
@Annotation(<expr>"42"</expr>)
|
||||
class C
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expression: "42"
|
||||
constant_value: KtSimpleConstantValue(constantValueKind=String, value=42)
|
||||
constant: 42
|
||||
Reference in New Issue
Block a user