From 19eaf4c56b124a355c87d93a90745f610043624b Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Wed, 17 Aug 2022 14:35:45 +0200 Subject: Add missing java primitives to annotation constant params parsing (#2610) --- .../main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/base/src/main/kotlin/translators/psi') diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt index a58e1b83..d98559e5 100644 --- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt @@ -710,6 +710,9 @@ class DefaultPsiToDocumentableTranslator( } private fun Any.toAnnotationLiteralValue() = when (this) { + is Byte -> IntValue(this.toInt()) + is Short -> IntValue(this.toInt()) + is Char -> StringValue(this.toString()) is Int -> IntValue(this) is Long -> LongValue(this) is Boolean -> BooleanValue(this) -- cgit