diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-10-27 14:38:34 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-10-29 11:57:20 +0100 |
commit | e6b76322ce8a5526194005a2b6756ed81d3fb550 (patch) | |
tree | 1aa23fb04a5b160169beb96fdb16c327384fafef /src/Kotlin | |
parent | cf0932d7ef77ccecb438dabeb0f2c83e4bbe8dbc (diff) | |
download | dokka-e6b76322ce8a5526194005a2b6756ed81d3fb550.tar.gz dokka-e6b76322ce8a5526194005a2b6756ed81d3fb550.tar.bz2 dokka-e6b76322ce8a5526194005a2b6756ed81d3fb550.zip |
correctly render star projections
Diffstat (limited to 'src/Kotlin')
-rw-r--r-- | src/Kotlin/DocumentationBuilder.kt | 10 |
1 files changed, 8 insertions, 2 deletions
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 = |