diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-11-05 15:51:23 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-11-05 15:51:23 +0100 |
commit | b643bf6f4b4c29676ce3301d92b7880b268d6722 (patch) | |
tree | 8f0fede2d5eac2110ca4687a35eefb8727ed4d7e /src/Kotlin/KotlinLanguageService.kt | |
parent | 0bad64896baed4056d75f8b948afe0d848bc8adf (diff) | |
download | dokka-b643bf6f4b4c29676ce3301d92b7880b268d6722.tar.gz dokka-b643bf6f4b4c29676ce3301d92b7880b268d6722.tar.bz2 dokka-b643bf6f4b4c29676ce3301d92b7880b268d6722.zip |
add tests; fixes related to qualified names of types
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 |