diff options
author | Douglas Sigelbaum <sigelbaum@google.com> | 2018-04-20 18:09:36 -0700 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-07-14 23:42:33 +0300 |
commit | 31a4a3804020130e7caf5826b317aaee5547c0d0 (patch) | |
tree | fabf252f9de613f8421d6df0d44fd1e66f365184 /core/src/main/kotlin/Kotlin/KotlinLanguageService.kt | |
parent | ad35def2efbb6eae6fae423bb639890aaa2cb93f (diff) | |
download | dokka-31a4a3804020130e7caf5826b317aaee5547c0d0.tar.gz dokka-31a4a3804020130e7caf5826b317aaee5547c0d0.tar.bz2 dokka-31a4a3804020130e7caf5826b317aaee5547c0d0.zip |
[backport] Use expression body
Original: d889d4e
Diffstat (limited to 'core/src/main/kotlin/Kotlin/KotlinLanguageService.kt')
-rw-r--r-- | core/src/main/kotlin/Kotlin/KotlinLanguageService.kt | 5 |
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 +} |