diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-03-02 18:09:44 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-03-02 18:09:44 +0100 |
commit | 0427adc6d074caeb5644358096be149de6eb48dc (patch) | |
tree | 58f8196f40f478d4a0ae5ca8cab1ab88676b2ea1 | |
parent | 94d8cc0102cc5787d860ba280a4638477d86e8c1 (diff) | |
download | dokka-0427adc6d074caeb5644358096be149de6eb48dc.tar.gz dokka-0427adc6d074caeb5644358096be149de6eb48dc.tar.bz2 dokka-0427adc6d074caeb5644358096be149de6eb48dc.zip |
don't report constructor as undocumented if its containing class is deprecated
-rw-r--r-- | src/Kotlin/DocumentationBuilder.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt index 0518bb03..ddea6d6e 100644 --- a/src/Kotlin/DocumentationBuilder.kt +++ b/src/Kotlin/DocumentationBuilder.kt @@ -83,9 +83,9 @@ class DocumentationBuilder(val session: ResolveSession, return content } - fun DeclarationDescriptor.isDeprecated() = getAnnotations().any { + fun DeclarationDescriptor.isDeprecated(): Boolean = getAnnotations().any { DescriptorUtils.getFqName(it.getType().getConstructor().getDeclarationDescriptor()).asString() == "kotlin.deprecated" - } + } || (this is ConstructorDescriptor && getContainingDeclaration().isDeprecated()) fun DeclarationDescriptor.signature(): String = when(this) { is ClassDescriptor, is PackageFragmentDescriptor -> DescriptorUtils.getFqName(this).asString() |