diff options
Diffstat (limited to 'src/Kotlin')
-rw-r--r-- | src/Kotlin/ContentBuilder.kt | 2 | ||||
-rw-r--r-- | src/Kotlin/DocumentationBuilder.kt | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Kotlin/ContentBuilder.kt b/src/Kotlin/ContentBuilder.kt index 2bf960a6..273009ab 100644 --- a/src/Kotlin/ContentBuilder.kt +++ b/src/Kotlin/ContentBuilder.kt @@ -139,7 +139,7 @@ fun DocumentationBuilder.functionBody(descriptor: DeclarationDescriptor, functio val bodyExpression = psiElement.getBodyExpression() when (bodyExpression) { is JetBlockExpression -> bodyExpression.getText().removeSurrounding("{", "}") - else -> bodyExpression.getText() + else -> bodyExpression!!.getText() } } else -> psiElement.getText() diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt index 8bbd7743..bea2f6fa 100644 --- a/src/Kotlin/DocumentationBuilder.kt +++ b/src/Kotlin/DocumentationBuilder.kt @@ -115,7 +115,7 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, } fun DeclarationDescriptor.isDeprecated(): Boolean = getAnnotations().any { - DescriptorUtils.getFqName(it.getType().getConstructor().getDeclarationDescriptor()).asString() == "kotlin.deprecated" + DescriptorUtils.getFqName(it.getType().getConstructor().getDeclarationDescriptor()!!).asString() == "kotlin.deprecated" } || (this is ConstructorDescriptor && getContainingDeclaration().isDeprecated()) fun DeclarationDescriptor.signature(): String = when(this) { @@ -664,7 +664,7 @@ class DocumentationBuilder(val resolutionFacade: ResolutionFacade, } fun ReceiverParameterDescriptor.build(): DocumentationNode { - var receiverClass: DeclarationDescriptor = getType().getConstructor().getDeclarationDescriptor() + var receiverClass: DeclarationDescriptor = getType().getConstructor().getDeclarationDescriptor()!! if ((receiverClass as? ClassDescriptor)?.isCompanionObject() ?: false) { receiverClass = receiverClass.getContainingDeclaration()!! } |