aboutsummaryrefslogtreecommitdiff
path: root/src/Kotlin/DocumentationBuilder.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-03-02 18:09:44 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-03-02 18:09:44 +0100
commit0427adc6d074caeb5644358096be149de6eb48dc (patch)
tree58f8196f40f478d4a0ae5ca8cab1ab88676b2ea1 /src/Kotlin/DocumentationBuilder.kt
parent94d8cc0102cc5787d860ba280a4638477d86e8c1 (diff)
downloaddokka-0427adc6d074caeb5644358096be149de6eb48dc.tar.gz
dokka-0427adc6d074caeb5644358096be149de6eb48dc.tar.bz2
dokka-0427adc6d074caeb5644358096be149de6eb48dc.zip
don't report constructor as undocumented if its containing class is deprecated
Diffstat (limited to 'src/Kotlin/DocumentationBuilder.kt')
-rw-r--r--src/Kotlin/DocumentationBuilder.kt4
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()