correct handling of delegate properties #KT-2786 fixed
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
trait FooTrait {
|
||||
val propertyTest: String
|
||||
}
|
||||
|
||||
class FooDelegate: FooTrait {
|
||||
override val propertyTest: String = "OK"
|
||||
}
|
||||
|
||||
class DelegateTest(): FooTrait by FooDelegate() {
|
||||
fun test() = propertyTest
|
||||
}
|
||||
|
||||
fun box() = DelegateTest().test()
|
||||
Reference in New Issue
Block a user