[NI] Fix exception for type check callable reference against error type

#KT-32029 Fixed
 #EA-145311 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-06-17 16:48:28 +03:00
parent 8fe632f52b
commit 7749afb13e
6 changed files with 44 additions and 1 deletions
@@ -129,7 +129,10 @@ class ReflectionTypes(module: ModuleDescriptor, private val notFoundClasses: Not
fun isNumberedTypeWithOneOrMoreNumber(type: KotlinType): Boolean {
val descriptor = type.constructor.declarationDescriptor as? ClassDescriptor ?: return false
if (DescriptorUtils.getFqName(descriptor).parent().toSafe() != KOTLIN_REFLECT_FQ_NAME) return false
val fqName = DescriptorUtils.getFqName(descriptor)
if (fqName.isRoot) return false
if (fqName.parent().toSafe() != KOTLIN_REFLECT_FQ_NAME) return false
val shortName = descriptor.name.asString()
for (prefix in PREFIXES) {