From f15a0711ae11b3a9f3868adc0e8be7a27b4f6346 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Wed, 27 May 2015 20:36:31 +0200 Subject: don't crash if we failed to resolve base type for an extension function --- src/Kotlin/DocumentationBuilder.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Kotlin/DocumentationBuilder.kt') diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt index 02ced7a4..967c20ca 100644 --- a/src/Kotlin/DocumentationBuilder.kt +++ b/src/Kotlin/DocumentationBuilder.kt @@ -379,7 +379,8 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, externalClassNodes: MutableMap): DocumentationNode { if (descriptor is CallableMemberDescriptor) { val extensionClassDescriptor = descriptor.getExtensionClassDescriptor() - if (extensionClassDescriptor != null && !isSamePackage(descriptor, extensionClassDescriptor)) { + if (extensionClassDescriptor != null && !isSamePackage(descriptor, extensionClassDescriptor) && + !ErrorUtils.isError(extensionClassDescriptor)) { val fqName = DescriptorUtils.getFqNameFromTopLevelClass(extensionClassDescriptor) return externalClassNodes.getOrPut(fqName, { val newNode = DocumentationNode(fqName.asString(), Content.Empty, Kind.ExternalClass) -- cgit