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 /core/src | |
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 'core/src')
-rw-r--r-- | core/src/main/kotlin/model/documentableProperties.kt | 9 | ||||
-rw-r--r-- | core/src/main/kotlin/model/properties/PropertyContainer.kt | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/core/src/main/kotlin/model/documentableProperties.kt b/core/src/main/kotlin/model/documentableProperties.kt index 2845c7fc..991f5311 100644 --- a/core/src/main/kotlin/model/documentableProperties.kt +++ b/core/src/main/kotlin/model/documentableProperties.kt @@ -25,3 +25,12 @@ data class ImplementedInterfaces(val interfaces: SourceSetDependent<List<TypeCon override val key: ExtraProperty.Key<Documentable, *> = ImplementedInterfaces } + +data class ExceptionInSupertypes(val exceptions: SourceSetDependent<List<TypeConstructor>>): ExtraProperty<Documentable> { + companion object : ExtraProperty.Key<Documentable, ExceptionInSupertypes> { + override fun mergeStrategyFor(left: ExceptionInSupertypes, right: ExceptionInSupertypes) = + MergeStrategy.Replace(ExceptionInSupertypes(left.exceptions + right.exceptions)) + } + + override val key: ExtraProperty.Key<Documentable, *> = ExceptionInSupertypes +}
\ No newline at end of file diff --git a/core/src/main/kotlin/model/properties/PropertyContainer.kt b/core/src/main/kotlin/model/properties/PropertyContainer.kt index 19189b39..162f1bc8 100644 --- a/core/src/main/kotlin/model/properties/PropertyContainer.kt +++ b/core/src/main/kotlin/model/properties/PropertyContainer.kt @@ -18,7 +18,7 @@ data class PropertyContainer<C : Any> internal constructor( companion object { fun <T : Any> empty(): PropertyContainer<T> = PropertyContainer(emptyMap()) - fun <T : Any> withAll(vararg extras: ExtraProperty<T>) = empty<T>().addAll(extras.toList()) + fun <T : Any> withAll(vararg extras: ExtraProperty<T>?) = empty<T>().addAll(extras.filterNotNull()) fun <T : Any> withAll(extras: Collection<ExtraProperty<T>>) = empty<T>().addAll(extras) } } |