From e6b76322ce8a5526194005a2b6756ed81d3fb550 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 27 Oct 2015 14:38:34 +0100 Subject: correctly render star projections --- src/Kotlin/DocumentationBuilder.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/Kotlin') diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt index b1aef822..a9ac8551 100644 --- a/src/Kotlin/DocumentationBuilder.kt +++ b/src/Kotlin/DocumentationBuilder.kt @@ -296,7 +296,12 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, } fun DocumentationNode.appendProjection(projection: TypeProjection, kind: DocumentationNode.Kind = DocumentationNode.Kind.Type) { - appendType(projection.type, kind, projection.projectionKind.label) + if (projection.isStarProjection) { + appendTextNode("*", Kind.Type) + } + else { + appendType(projection.type, kind, projection.projectionKind.label) + } } fun DocumentationNode.appendType(jetType: KtType?, kind: DocumentationNode.Kind = DocumentationNode.Kind.Type, prefix: String = "") { @@ -329,8 +334,9 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, append(node, DocumentationReference.Kind.Detail) node.appendAnnotations(jetType) - for (typeArgument in jetType.arguments) + for (typeArgument in jetType.arguments) { node.appendProjection(typeArgument) + } } fun ClassifierDescriptor.isBoringBuiltinClass(): Boolean = -- cgit