Analysis API: separate constant values from annotation values
This commit is contained in:
-6
@@ -1,6 +0,0 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationInner(val value: Annotation)
|
||||
|
||||
@AnnotationInner(<expr>Annotation(strings = arrayOf("v1", "v2"))</expr>)
|
||||
class C
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
expression: Annotation(strings = arrayOf("v1", "v2"))
|
||||
constant_value: KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v1)
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v2)
|
||||
]))
|
||||
constant: null
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationInner(val value: Annotation)
|
||||
|
||||
@AnnotationInner(<expr>Annotation(strings = ["v1", "v2"])</expr>)
|
||||
class C
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
expression: Annotation(strings = ["v1", "v2"])
|
||||
constant_value: KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v1)
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v2)
|
||||
]))
|
||||
constant: null
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationInner(val value: Annotation)
|
||||
|
||||
@AnnotationInner(<expr>Annotation(*["v1", "v2"])</expr>)
|
||||
class C
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
expression: Annotation(*["v1", "v2"])
|
||||
constant_value: KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v1)
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v2)
|
||||
]))
|
||||
constant: null
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationArray(vararg val annos: Annotation)
|
||||
|
||||
@AnnotationArray(annos = <expr>arrayOf(Annotation("v1", "v2"), Annotation(strings = arrayOf("v3", "v4")))</expr>)
|
||||
class C
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
expression: arrayOf(Annotation("v1", "v2"), Annotation(strings = arrayOf("v3", "v4")))
|
||||
constant_value: KtArrayConstantValue [
|
||||
KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v1)
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v2)
|
||||
]))
|
||||
KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v3)
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v4)
|
||||
]))
|
||||
]
|
||||
constant: null
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationArray(vararg val annos: Annotation)
|
||||
|
||||
@AnnotationArray(annos = <expr>[Annotation("v1", "v2"), Annotation(strings = ["v3", "v4"])]</expr>)
|
||||
class C
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
expression: [Annotation("v1", "v2"), Annotation(strings = ["v3", "v4"])]
|
||||
constant_value: KtArrayConstantValue [
|
||||
KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v1)
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v2)
|
||||
]))
|
||||
KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v3)
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v4)
|
||||
]))
|
||||
]
|
||||
constant: null
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationInner(val value: Annotation)
|
||||
|
||||
@AnnotationInner(<expr>Annotation("v1")</expr>)
|
||||
class C
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
expression: Annotation("v1")
|
||||
constant_value: KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v1)
|
||||
]))
|
||||
constant: null
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
annotation class Annotation(vararg val strings: String)
|
||||
|
||||
annotation class AnnotationInner(val value: Annotation)
|
||||
|
||||
@AnnotationInner(<expr>Annotation("v1", "v2")</expr>)
|
||||
class C
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
expression: Annotation("v1", "v2")
|
||||
constant_value: KtAnnotationConstantValue(Annotation, (strings = KtArrayConstantValue [
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v1)
|
||||
KtLiteralConstantValue(constantValueKind=String, value=v2)
|
||||
]))
|
||||
constant: null
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
enum class Color {
|
||||
R,
|
||||
G,
|
||||
B
|
||||
}
|
||||
|
||||
annotation class Annotation(val color : Color)
|
||||
|
||||
@Annotation(<expr>Color.R</expr>)
|
||||
class C
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
expression: Color.R
|
||||
constant_value: KtEnumEntryConstantValue(/Color.R)
|
||||
constant: null
|
||||
analysis/analysis-api/testData/components/compileTimeConstantProvider/evaluate/propertyInit_Byte.txt
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
||||
expression: 42
|
||||
constant_value: KtLiteralConstantValue(constantValueKind=Byte, value=42)
|
||||
constant: 42
|
||||
constantValueKind: Byte
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
expression: 42 / 0
|
||||
constant_value: KtErrorValue(Division by zero)
|
||||
constant: null
|
||||
constant: error("Division by zero")
|
||||
constantValueKind: Error
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
expression: 42 / 0
|
||||
constant_value: KtErrorValue(/ by zero)
|
||||
constant: null
|
||||
constant: error("/ by zero")
|
||||
constantValueKind: Error
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
expression: 3.14
|
||||
constant_value: KtLiteralConstantValue(constantValueKind=Double, value=3.14)
|
||||
constant: 3.14
|
||||
constantValueKind: Double
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
expression: 3.14f
|
||||
constant_value: KtLiteralConstantValue(constantValueKind=Float, value=3.14)
|
||||
constant: 3.14
|
||||
constantValueKind: Float
|
||||
|
||||
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
||||
expression: 42
|
||||
constant_value: KtLiteralConstantValue(constantValueKind=Int, value=42)
|
||||
constant: 42
|
||||
constantValueKind: Int
|
||||
|
||||
analysis/analysis-api/testData/components/compileTimeConstantProvider/evaluate/propertyInit_Long.txt
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
||||
expression: 42
|
||||
constant_value: KtLiteralConstantValue(constantValueKind=Long, value=42)
|
||||
constant: 42
|
||||
constantValueKind: Long
|
||||
|
||||
analysis/analysis-api/testData/components/compileTimeConstantProvider/evaluate/propertyInit_UInt.txt
Vendored
+1
-1
@@ -1,3 +1,3 @@
|
||||
expression: 42u
|
||||
constant_value: KtLiteralConstantValue(constantValueKind=UInt, value=42)
|
||||
constant: 42
|
||||
constantValueKind: Long
|
||||
|
||||
Vendored
+2
-2
@@ -1,3 +1,3 @@
|
||||
expression: "42"
|
||||
constant_value: KtLiteralConstantValue(constantValueKind=String, value=42)
|
||||
constant: 42
|
||||
constant: "42"
|
||||
constantValueKind: String
|
||||
|
||||
Reference in New Issue
Block a user