aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Kotlin/DocumentationBuilder.kt9
-rw-r--r--src/Kotlin/KotlinLanguageService.kt9
2 files changed, 14 insertions, 4 deletions
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt
index 6ce7727c..7804fd72 100644
--- a/src/Kotlin/DocumentationBuilder.kt
+++ b/src/Kotlin/DocumentationBuilder.kt
@@ -474,12 +474,15 @@ class DocumentationBuilder(val session: ResolveSession,
val doc = parseDocumentation(this)
val name = getName().asString()
val prefix = when (getVariance()) {
- Variance.IN_VARIANCE -> "in "
- Variance.OUT_VARIANCE -> "out "
+ Variance.IN_VARIANCE -> "in"
+ Variance.OUT_VARIANCE -> "out"
else -> ""
}
- val node = DocumentationNode(prefix + name, doc, DocumentationNode.Kind.TypeParameter)
+ val node = DocumentationNode(name, doc, DocumentationNode.Kind.TypeParameter)
+ if (prefix != "") {
+ node.appendTextNode(prefix, Kind.Modifier)
+ }
val builtIns = KotlinBuiltIns.getInstance()
for (constraint in getUpperBounds()) {
diff --git a/src/Kotlin/KotlinLanguageService.kt b/src/Kotlin/KotlinLanguageService.kt
index 435fbc64..a4f62c3f 100644
--- a/src/Kotlin/KotlinLanguageService.kt
+++ b/src/Kotlin/KotlinLanguageService.kt
@@ -125,8 +125,15 @@ class KotlinLanguageService : LanguageService {
}
private fun ContentBlock.renderTypeParameter(node: DocumentationNode) {
- val constraints = node.details(DocumentationNode.Kind.UpperBound)
+ val modifier = node.details(DocumentationNode.Kind.Modifier).singleOrNull()
+ if (modifier != null) {
+ keyword(modifier.name)
+ nbsp()
+ }
+
identifier(node.name)
+
+ val constraints = node.details(DocumentationNode.Kind.UpperBound)
if (constraints.any()) {
nbsp()
symbol(":")