diff options
Diffstat (limited to 'src/Kotlin/KotlinLanguageService.kt')
-rw-r--r-- | src/Kotlin/KotlinLanguageService.kt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Kotlin/KotlinLanguageService.kt b/src/Kotlin/KotlinLanguageService.kt index d07f4c09..0d39f410 100644 --- a/src/Kotlin/KotlinLanguageService.kt +++ b/src/Kotlin/KotlinLanguageService.kt @@ -65,8 +65,7 @@ class KotlinLanguageService : LanguageService { private fun DocumentationNode.getReceiverQName(): String? { if (kind != DocumentationNode.Kind.Function && kind != DocumentationNode.Kind.Property) return null val receiver = details(DocumentationNode.Kind.Receiver).singleOrNull() ?: return null - val receiverType = receiver.detail(DocumentationNode.Kind.Type) - return (receiverType.links.firstOrNull() ?: receiverType.hiddenLinks.firstOrNull())?.qualifiedName() + return receiver.detail(DocumentationNode.Kind.Type).qualifiedNameFromType() } companion object { @@ -405,4 +404,6 @@ class KotlinLanguageService : LanguageService { identifier(node.name) } } -}
\ No newline at end of file +} + +fun DocumentationNode.qualifiedNameFromType() = (links.firstOrNull() ?: hiddenLinks.firstOrNull())?.qualifiedName() ?: name |