Fix EA-221456, check for error types before method signature calculation

This commit is contained in:
Yan Zhulanow
2020-03-05 21:27:42 +09:00
parent c8bad15ba9
commit fc433dece8
@@ -494,6 +494,10 @@ private fun getMethodSignatureFromDescriptor(context: KtElement, descriptor: Cal
val parameterTypes = listOfNotNull(receiverType) + originalDescriptor.valueParameters.map { it.type.toPsiType() } val parameterTypes = listOfNotNull(receiverType) + originalDescriptor.valueParameters.map { it.type.toPsiType() }
val returnType = originalDescriptor.returnType?.toPsiType() ?: PsiType.VOID 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) } + val desc = parameterTypes.joinToString("", prefix = "(", postfix = ")") { MapPsiToAsmDesc.typeDesc(it) } +
MapPsiToAsmDesc.typeDesc(returnType) MapPsiToAsmDesc.typeDesc(returnType)