Add more detailed message for EA-227305 and EA-226744

This commit is contained in:
Zalim Bashorov
2020-05-25 15:02:16 +03:00
parent 7b55a49ddd
commit 7f41dc4828
@@ -20,7 +20,9 @@ val KotlinType.nameIfStandardType: Name?
get() = constructor.declarationDescriptor?.takeIf(KotlinBuiltIns::isBuiltIn)?.name
fun KotlinType.getJetTypeFqName(printTypeArguments: Boolean): String {
val declaration = requireNotNull(constructor.declarationDescriptor)
val declaration = requireNotNull(constructor.declarationDescriptor) {
"declarationDescriptor is null for constructor = $constructor with ${constructor.javaClass}"
}
if (declaration is TypeParameterDescriptor) {
return StringUtil.join(declaration.upperBounds, { type -> type.getJetTypeFqName(printTypeArguments) }, "&")
}