aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/model/documentableProperties.kt
blob: 67e5e88d3beadce46f23b066c6d0999e49070ac1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package org.jetbrains.dokka.model

import org.jetbrains.dokka.model.properties.ExtraProperty
import org.jetbrains.dokka.model.properties.MergeStrategy

data class InheritedFunction(val isInherited: Boolean): ExtraProperty<DFunction> {
    object InheritedFunctionKey: ExtraProperty.Key<DFunction, Boolean> {
        override fun mergeStrategyFor(left: Boolean, right: Boolean) = MergeStrategy.Fail {
            throw IllegalArgumentException("Function inheritance should be consistent!")
        }
    }
    override val key: ExtraProperty.Key<DFunction, Boolean> =
        InheritedFunctionKey
}