Use delegate initializer expression resolution scope for 'toDelegateFor' resolution.

This commit is contained in:
Dmitry Petrov
2016-12-06 14:57:18 +03:00
committed by Stanislav Erokhin
parent a6bc7271ae
commit 5ddf8e60e6
25 changed files with 424 additions and 29 deletions
@@ -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
}