More correct rendering of synthetic extension descriptors

This commit is contained in:
Valentin Kipyatkov
2015-08-18 15:47:22 +03:00
parent 67e29ac566
commit e83711d41a
@@ -327,12 +327,12 @@ internal class DescriptorRendererImpl(
builder.append(" is a module") builder.append(" is a module")
return return
} }
builder.append(" ").append(renderMessage("defined in")).append(" ")
val containingDeclaration = descriptor.getContainingDeclaration() val containingDeclaration = descriptor.containingDeclaration
if (containingDeclaration != null) { if (containingDeclaration != null && containingDeclaration !is ModuleDescriptor) {
builder.append(" ").append(renderMessage("defined in")).append(" ")
val fqName = DescriptorUtils.getFqName(containingDeclaration) val fqName = DescriptorUtils.getFqName(containingDeclaration)
builder.append(if (FqName.ROOT.equalsTo(fqName)) "root package" else renderFqName(fqName)) builder.append(if (fqName.isRoot) "root package" else renderFqName(fqName))
} }
} }
private fun renderAnnotations(annotated: Annotated, builder: StringBuilder, needBrackets: Boolean = false) { private fun renderAnnotations(annotated: Annotated, builder: StringBuilder, needBrackets: Boolean = false) {