Add ConstantValueKind to KtSimpleConstantValue

This commit is contained in:
Stanislav Erokhin
2021-01-11 14:20:43 +01:00
parent d24331955e
commit d50a5e7517
5 changed files with 9 additions and 7 deletions
@@ -58,7 +58,7 @@ object DebugSymbolRenderer {
}
"${value::class.simpleName!!}($symbolTag)"
}
is KtSimpleConstantValue<*> -> renderValue(value.constant)
is KtSimpleConstantValue<*> -> renderValue(value.value)
is KtNamedConstantValue -> "${renderValue(value.name)} = ${renderValue(value.expression)}"
is KtAnnotationCall ->
"${renderValue(value.classId)}${value.arguments.joinToString(prefix = "(", postfix = ")") { renderValue(it) }}"
@@ -5,7 +5,9 @@
package org.jetbrains.kotlin.idea.frontend.api.symbols.markers
import org.jetbrains.kotlin.types.ConstantValueKind
sealed class KtConstantValue
object KtUnsupportedConstantValue : KtConstantValue()
data class KtSimpleConstantValue<T>(val constant: T?) : KtConstantValue()
data class KtSimpleConstantValue<T>(val constantValueKind: ConstantValueKind<T>, val value: T) : KtConstantValue()