14 lines
255 B
Kotlin
Vendored
14 lines
255 B
Kotlin
Vendored
interface FooTrait {
|
|
val propertyTest: String
|
|
}
|
|
|
|
class FooDelegate: FooTrait {
|
|
override val propertyTest: String = "OK"
|
|
}
|
|
|
|
class DelegateTest(): FooTrait by FooDelegate() {
|
|
fun test() = propertyTest
|
|
}
|
|
|
|
fun box() = DelegateTest().test()
|