diff --git a/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/KotlinUastLanguagePlugin.kt b/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/KotlinUastLanguagePlugin.kt index a7267f4eefd..d67cb9cc1f4 100644 --- a/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/KotlinUastLanguagePlugin.kt +++ b/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/KotlinUastLanguagePlugin.kt @@ -74,8 +74,8 @@ class KotlinUastLanguagePlugin : UastLanguagePlugin { val parentUnwrapped = KotlinConverter.unwrapElements(parent) ?: return null if (parent is KtValueArgument && parentUnwrapped is KtAnnotationEntry) { val argumentName = parent.getArgumentName()?.asName?.asString() ?: "" - return (convertElementWithParent(parentUnwrapped, null) as UAnnotation) - .attributeValues.find { it.name == argumentName } + return (convertElementWithParent(parentUnwrapped, null) as? UAnnotation) + ?.attributeValues?.find { it.name == argumentName } } else return convertElementWithParent(parentUnwrapped, null)