Constructors represented "as in Java".
TODO: extract nested initializers somehow.
This commit is contained in:
committed by
Dmitry Petrov
parent
57c1b3e0e2
commit
8528c23194
@@ -0,0 +1,19 @@
|
||||
interface ILeft {
|
||||
fun foo() {}
|
||||
val bar: Int get() = 1
|
||||
}
|
||||
|
||||
interface IRight {
|
||||
fun foo() {}
|
||||
val bar: Int get() = 2
|
||||
}
|
||||
|
||||
class CBoth : ILeft, IRight {
|
||||
override fun foo() {
|
||||
super<ILeft>.foo()
|
||||
super<IRight>.foo()
|
||||
}
|
||||
|
||||
override val bar: Int
|
||||
get() = super<ILeft>.bar + super<IRight>.bar
|
||||
}
|
||||
Reference in New Issue
Block a user