aboutsummaryrefslogtreecommitdiff
path: root/src/Analysis
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-12 18:23:07 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-12 18:23:07 +0400
commit708c5fc36c943ab7fa492f35f4b6ed75c985c12a (patch)
treea88cf7c55826094cb8de301ce7bedda033e4261d /src/Analysis
parente0acbb5fb51cbeca78bc14aaaddd770d0896d2bb (diff)
downloaddokka-708c5fc36c943ab7fa492f35f4b6ed75c985c12a.tar.gz
dokka-708c5fc36c943ab7fa492f35f4b6ed75c985c12a.tar.bz2
dokka-708c5fc36c943ab7fa492f35f4b6ed75c985c12a.zip
Do not fail if source is not found, there are lots of generated items.
Diffstat (limited to 'src/Analysis')
-rw-r--r--src/Analysis/CommentsAPI.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Analysis/CommentsAPI.kt b/src/Analysis/CommentsAPI.kt
index c8a2ed3c..a1823740 100644
--- a/src/Analysis/CommentsAPI.kt
+++ b/src/Analysis/CommentsAPI.kt
@@ -8,7 +8,7 @@ import org.jetbrains.jet.lang.psi.*
fun BindingContext.getDocumentationElements(descriptor: DeclarationDescriptor): List<KDoc> {
val psiElement = DescriptorToSourceUtils.descriptorToDeclaration(descriptor)
if (psiElement == null)
- throw IllegalArgumentException("$descriptor doesn't have connection to source code, is it synthetic?")
+ return listOf()
return psiElement.previousSiblings() // go backwards
.takeWhile { it !is JetDeclaration } // till previous declaration