Inherited¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface Inherited : KaCallableImplementationState
The declaration has the implementation provided by a supertype or multiple supertypes, and does not have explicit implementation in the target class.
Properties¶
isAmbiguous¶
abstract val isAmbiguous: Boolean
Whether multiple supertypes provide implementations. As the compiler cannot decide which implementation to choose, the declaration must be overridden explicitly. E.g.:
interface ColoredEntity {
val color: String
}
interface GreenEntity : ColoredEntity {
override val color get() = "green"
}
interface BlueEntity : ColoredEntity {
override val color get() = "blue"
}
// Interface 'SeaColorEntity' must override 'color' because it inherits multiple interface methods for it
interface SeaColorEntity : GreenEntity, BlueEntity
isOverridable¶
abstract val isOverridable: Boolean
Whether the declaration can be overridden in the target class (e.g., it is not marked as final in a supertype).