diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2020-10-15 09:40:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-15 09:40:09 +0200 |
commit | bf5e18fd1694882a318e204be6a31bc1757db72d (patch) | |
tree | eddc619638733a6b5822d6a95855842bf6bf1102 /plugins/base/src/main/kotlin/transformers/documentables/utils.kt | |
parent | 7e2678e5e182afc10c3ca98107aae3c7590b909b (diff) | |
download | dokka-bf5e18fd1694882a318e204be6a31bc1757db72d.tar.gz dokka-bf5e18fd1694882a318e204be6a31bc1757db72d.tar.bz2 dokka-bf5e18fd1694882a318e204be6a31bc1757db72d.zip |
IsException should also be true when class inherits from Exception (#1558)
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/documentables/utils.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/documentables/utils.kt | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/utils.kt b/plugins/base/src/main/kotlin/transformers/documentables/utils.kt index 6b87fe39..ecf75a1f 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/utils.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/utils.kt @@ -2,6 +2,7 @@ package org.jetbrains.dokka.base.transformers.documentables import org.jetbrains.dokka.model.Annotations import org.jetbrains.dokka.model.Documentable +import org.jetbrains.dokka.model.ExceptionInSupertypes import org.jetbrains.dokka.model.WithSupertypes import org.jetbrains.dokka.model.properties.WithExtraProperties @@ -16,9 +17,5 @@ val <T> T.deprecatedAnnotation where T : WithExtraProperties<out Documentable> } } -val WithSupertypes.isException: Boolean - get() = supertypes.values.flatten().any { - val dri = it.typeConstructor.dri.toString() - dri == "kotlin/Exception///PointingToDeclaration/" || - dri == "java.lang/Exception///PointingToDeclaration/" - }
\ No newline at end of file +val <T : WithExtraProperties<out Documentable>> T.isException: Boolean + get() = extra[ExceptionInSupertypes] != null
\ No newline at end of file |