Do not search inheritors of Any
This commit is contained in:
@@ -97,6 +97,7 @@ class TypeInstantiationItems(
|
|||||||
val typeArgs = type.getArguments()
|
val typeArgs = type.getArguments()
|
||||||
items.addIfNotNull(createTypeInstantiationItem(classifier, typeArgs, tail))
|
items.addIfNotNull(createTypeInstantiationItem(classifier, typeArgs, tail))
|
||||||
|
|
||||||
|
if (!KotlinBuiltIns.getInstance().isAny(classifier)) { // do not search inheritors of Any
|
||||||
inheritanceSearchers.addInheritorSearcher(classifier, classifier, typeArgs, tail)
|
inheritanceSearchers.addInheritorSearcher(classifier, classifier, typeArgs, tail)
|
||||||
|
|
||||||
val javaAnalogFqName = KotlinToJavaTypesMap.getInstance().getKotlinToJavaFqName(DescriptorUtils.getFqNameSafe(classifier))
|
val javaAnalogFqName = KotlinToJavaTypesMap.getInstance().getKotlinToJavaFqName(DescriptorUtils.getFqNameSafe(classifier))
|
||||||
@@ -107,6 +108,7 @@ class TypeInstantiationItems(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun MutableCollection<InheritanceItemsSearcher>.addInheritorSearcher(
|
private fun MutableCollection<InheritanceItemsSearcher>.addInheritorSearcher(
|
||||||
descriptor: ClassDescriptor, kotlinClassDescriptor: ClassDescriptor, typeArgs: List<TypeProjection>, tail: Tail?
|
descriptor: ClassDescriptor, kotlinClassDescriptor: ClassDescriptor, typeArgs: List<TypeProjection>, tail: Tail?
|
||||||
|
|||||||
@@ -7,3 +7,4 @@ val v: Any = <caret>
|
|||||||
// ABSENT: ::foo
|
// ABSENT: ::foo
|
||||||
// ABSENT: ::C
|
// ABSENT: ::C
|
||||||
// ABSENT: ::Runnable
|
// ABSENT: ::Runnable
|
||||||
|
// ABSENT: C
|
||||||
|
|||||||
Reference in New Issue
Block a user