Use delegate initializer expression resolution scope for 'toDelegateFor' resolution.
This commit is contained in:
committed by
Stanislav Erokhin
parent
a6bc7271ae
commit
5ddf8e60e6
@@ -0,0 +1,13 @@
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class A
|
||||
|
||||
object Delegate {
|
||||
operator fun getValue(state: A, desc: KProperty<*>): Int = 0
|
||||
operator fun setValue(state: A, desc: KProperty<*>, value: Int) {}
|
||||
}
|
||||
|
||||
open class B {
|
||||
val A.foo: Int by Delegate
|
||||
var A.bar: Int by Delegate
|
||||
}
|
||||
Reference in New Issue
Block a user