From bf5e18fd1694882a318e204be6a31bc1757db72d Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Thu, 15 Oct 2020 09:40:09 +0200 Subject: IsException should also be true when class inherits from Exception (#1558) --- plugins/base/src/main/kotlin/transformers/documentables/utils.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/base/src/main/kotlin/transformers/documentables/utils.kt') 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.deprecatedAnnotation where T : WithExtraProperties } } -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.isException: Boolean + get() = extra[ExceptionInSupertypes] != null \ No newline at end of file -- cgit