Skip to content

Commit b9b659a

Browse files
MarkTheHopefulice-phoenix
authored andcommitted
KT-58965: Added Inheritance Delegation to Inheritance
1 parent 18bc0cf commit b9b659a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: docs/src/md/kotlin.core/inheritance.md

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ Object types cannot be inherited from.
2525
Inheritance is the primary mechanism of introducing [subtyping relations][Subtyping] between user-defined types in Kotlin.
2626
When a classifier type $A$ is declared with base types $B_1, \dots, B_m$, it introduces subtyping relations $A <: B_1, \ldots, A <: B_m$, which are then used in [overload resolution][Overload resolution] and [type inference][Type inference] mechanisms.
2727

28+
#### Inheritance delegation
29+
30+
In a classifier declaration $C$, any interface supertype $I$ inheritance may be [delegated][Inheritance delegation] to an arbitrary value $v$ of type $T$, given $T$ is a subtype of $I$.
31+
2832
#### Abstract classes {#abstract-classes-inheritance}
2933

3034
A class declared `abstract` cannot be instantiated, i.e., an object of this class cannot be created directly.

0 commit comments

Comments
 (0)