aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/model/documentableProperties.kt16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/src/main/kotlin/model/documentableProperties.kt b/core/src/main/kotlin/model/documentableProperties.kt
index 699a1df1..1a0c6303 100644
--- a/core/src/main/kotlin/model/documentableProperties.kt
+++ b/core/src/main/kotlin/model/documentableProperties.kt
@@ -4,11 +4,11 @@ import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.properties.ExtraProperty
import org.jetbrains.dokka.model.properties.MergeStrategy
-data class InheritedFunction(val inheritedFrom: DRI?): ExtraProperty<DFunction> {
+data class InheritedFunction(val inheritedFrom: SourceSetDependent<DRI?>): ExtraProperty<DFunction> {
companion object : ExtraProperty.Key<DFunction, InheritedFunction> {
- override fun mergeStrategyFor(left: InheritedFunction, right: InheritedFunction) = MergeStrategy.Fail {
- throw IllegalArgumentException("Function inheritance should be consistent!")
- }
+ override fun mergeStrategyFor(left: InheritedFunction, right: InheritedFunction) = MergeStrategy.Replace(
+ InheritedFunction(left.inheritedFrom + right.inheritedFrom)
+ )
}
val isInherited: Boolean
@@ -17,11 +17,11 @@ data class InheritedFunction(val inheritedFrom: DRI?): ExtraProperty<DFunction>
override val key: ExtraProperty.Key<DFunction, *> = InheritedFunction
}
-data class ImplementedInterfaces(val interfaces: List<DRI>): ExtraProperty<Documentable> {
+data class ImplementedInterfaces(val interfaces: SourceSetDependent<List<DRI>>): ExtraProperty<Documentable> {
companion object : ExtraProperty.Key<Documentable, ImplementedInterfaces> {
- override fun mergeStrategyFor(left: ImplementedInterfaces, right: ImplementedInterfaces) = MergeStrategy.Fail {
- throw IllegalArgumentException("Implemented interfaces should be consistent!")
- }
+ override fun mergeStrategyFor(left: ImplementedInterfaces, right: ImplementedInterfaces) = MergeStrategy.Replace(
+ ImplementedInterfaces(left.interfaces + right.interfaces)
+ )
}
override val key: ExtraProperty.Key<Documentable, *> = ImplementedInterfaces