[K2] Rewrite the way of extraction const values from IR for FIR
Right now it is much easier to extract constant values from `EvaluatedConstTracker` #KT-57928 #KT-57929
This commit is contained in:
@@ -30,12 +30,12 @@ abstract class IntegerValueConstant<out T> protected constructor(value: T) : Con
|
||||
abstract class UnsignedValueConstant<out T> protected constructor(value: T) : ConstantValue<T>(value)
|
||||
|
||||
class AnnotationValue private constructor(value: Value) : ConstantValue<AnnotationValue.Value>(value) {
|
||||
class Value(val type: KotlinTypeMarker, val argumentsMapping: Map<Name, ConstantValue<*>?>)
|
||||
class Value(val type: KotlinTypeMarker, val argumentsMapping: Map<Name, ConstantValue<*>>)
|
||||
|
||||
override fun <R, D> accept(visitor: AnnotationArgumentVisitor<R, D>, data: D): R = visitor.visitAnnotationValue(this, data)
|
||||
|
||||
companion object {
|
||||
fun create(type: KotlinTypeMarker, argumentsMapping: Map<Name, ConstantValue<*>?>): AnnotationValue {
|
||||
fun create(type: KotlinTypeMarker, argumentsMapping: Map<Name, ConstantValue<*>>): AnnotationValue {
|
||||
return AnnotationValue(
|
||||
Value(type, argumentsMapping)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user