[SLC] inherit SymbolPsiLiteral from PsiLiteralExpression
We should use PsiLiteralExpression instead of PsiLiteral as it is used in the Java world. Effectively, `psiLiteral` property already has this type (as `createPsiExpression` produce `PsiExpression`), but we missed this part before and used just PsiLiteral for our own class ^KT-63949 Fixed
This commit is contained in:
committed by
Space Team
parent
e068333021
commit
f39c72360d
+3
-2
@@ -109,8 +109,9 @@ internal class SymbolPsiReference(
|
||||
internal class SymbolPsiLiteral(
|
||||
override val kotlinOrigin: KtElement?,
|
||||
lightParent: PsiElement,
|
||||
private val psiLiteral: PsiLiteral,
|
||||
) : SymbolPsiAnnotationMemberValue(kotlinOrigin, lightParent), PsiLiteral {
|
||||
private val psiLiteral: PsiLiteralExpression,
|
||||
) : SymbolPsiAnnotationMemberValue(kotlinOrigin, lightParent), PsiLiteralExpression {
|
||||
override fun getValue(): Any? = psiLiteral.value
|
||||
override fun getText(): String = psiLiteral.text
|
||||
override fun getType(): PsiType? = psiLiteral.type
|
||||
}
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@ internal fun KtAnnotationValue.toAnnotationMemberValue(parent: PsiElement): PsiA
|
||||
is KtConstantAnnotationValue -> {
|
||||
constantValue.createPsiExpression(parent)?.let {
|
||||
when (it) {
|
||||
is PsiLiteral -> SymbolPsiLiteral(sourcePsi, parent, it)
|
||||
is PsiLiteralExpression -> SymbolPsiLiteral(sourcePsi, parent, it)
|
||||
else -> SymbolPsiExpression(sourcePsi, parent, it)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user