Skip to content

Commit

Permalink
Fix gathering docs obtained from inheriting java sources in descriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
BarkingBad authored and IgnatBeresnev committed May 13, 2022
1 parent 8feb5c9 commit 02aa4eb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -912,9 +912,9 @@ private class DokkaDescriptorVisitor(
)
} ?: getJavaDocs())?.takeIf { it.children.isNotEmpty() }

private fun DeclarationDescriptor.getJavaDocs() = (this as? CallableDescriptor)
?.overriddenDescriptors
?.mapNotNull { it.findPsi() as? PsiNamedElement }
private fun DeclarationDescriptor.getJavaDocs() = (
((this as? CallableDescriptor)?.overriddenDescriptors ?: emptyList()) + listOf(this)
)?.mapNotNull { it.findPsi() as? PsiNamedElement }
?.firstOrNull()
?.let { javadocParser.parseDocumentation(it) }

Expand Down

0 comments on commit 02aa4eb

Please sign in to comment.