aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/Kotlin/KotlinLanguageService.kt')
-rw-r--r--core/src/main/kotlin/Kotlin/KotlinLanguageService.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
index a0d8f95d..6fcf3772 100644
--- a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
+++ b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
@@ -315,6 +315,7 @@ class KotlinLanguageService : LanguageService {
NodeKind.Interface -> keyword("interface ")
NodeKind.EnumItem -> keyword("enum val ")
NodeKind.Object -> keyword("object ")
+ NodeKind.TypeAlias -> keyword("typealias ")
else -> throw IllegalArgumentException("Node $node is not a class-like object")
}
@@ -322,6 +323,13 @@ class KotlinLanguageService : LanguageService {
renderTypeParametersForNode(node, renderMode)
renderSupertypesForNode(node, renderMode)
renderExtraTypeParameterConstraints(node, renderMode)
+
+ if (node.kind == NodeKind.TypeAlias) {
+ nbsp()
+ symbol("=")
+ nbsp()
+ renderType(node.detail(NodeKind.TypeAliasUnderlyingType), renderMode)
+ }
}
private fun ContentBlock.renderFunction(node: DocumentationNode,