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")
return
}
builder.append(" ").append(renderMessage("defined in")).append(" ")
val containingDeclaration = descriptor.getContainingDeclaration()
if (containingDeclaration != null) {
val containingDeclaration = descriptor.containingDeclaration
if (containingDeclaration != null && containingDeclaration !is ModuleDescriptor) {
builder.append(" ").append(renderMessage("defined in")).append(" ")
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) {