From fc433dece8255e3f117447c4f3077ade4199205c Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Thu, 5 Mar 2020 21:27:42 +0900 Subject: [PATCH] Fix EA-221456, check for error types before method signature calculation --- .../jetbrains/uast/kotlin/internal/kotlinInternalUastUtils.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/internal/kotlinInternalUastUtils.kt b/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/internal/kotlinInternalUastUtils.kt index ee903fb3653..5aa117e49f2 100644 --- a/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/internal/kotlinInternalUastUtils.kt +++ b/plugins/uast-kotlin/src/org/jetbrains/uast/kotlin/internal/kotlinInternalUastUtils.kt @@ -494,6 +494,10 @@ private fun getMethodSignatureFromDescriptor(context: KtElement, descriptor: Cal val parameterTypes = listOfNotNull(receiverType) + originalDescriptor.valueParameters.map { it.type.toPsiType() } val returnType = originalDescriptor.returnType?.toPsiType() ?: PsiType.VOID + if (parameterTypes.any { !it.isValid } || !returnType.isValid) { + return null + } + val desc = parameterTypes.joinToString("", prefix = "(", postfix = ")") { MapPsiToAsmDesc.typeDesc(it) } + MapPsiToAsmDesc.typeDesc(returnType)