aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Sigelbaum <sigelbaum@google.com>2018-04-20 18:09:36 -0700
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-07-14 23:42:33 +0300
commit31a4a3804020130e7caf5826b317aaee5547c0d0 (patch)
treefabf252f9de613f8421d6df0d44fd1e66f365184
parentad35def2efbb6eae6fae423bb639890aaa2cb93f (diff)
downloaddokka-31a4a3804020130e7caf5826b317aaee5547c0d0.tar.gz
dokka-31a4a3804020130e7caf5826b317aaee5547c0d0.tar.bz2
dokka-31a4a3804020130e7caf5826b317aaee5547c0d0.zip
[backport] Use expression body
Original: d889d4e
-rw-r--r--core/src/main/kotlin/Kotlin/KotlinLanguageService.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
index 69a97848..79350237 100644
--- a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
+++ b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
@@ -459,7 +459,8 @@ class KotlinLanguageService : CommonLanguageService() {
}
}
-fun DocumentationNode.qualifiedNameFromType() =
- details.firstOrNull { it.kind == NodeKind.QualifiedName }?.name
+fun DocumentationNode.qualifiedNameFromType(): String {
+ return details.firstOrNull { it.kind == NodeKind.QualifiedName }?.name
?: (links.firstOrNull() ?: hiddenLinks.firstOrNull())?.qualifiedName()
?: name
+}