Inline get/setValues for local delegated properties

This commit is contained in:
Mikhael Bogdanov
2016-06-14 13:03:14 +03:00
parent 6f761d4e7d
commit 679f53b449
12 changed files with 144 additions and 95 deletions
@@ -0,0 +1,12 @@
package foo
import kotlin.reflect.KProperty
class Delegate {
operator fun getValue(t: Any?, p: KProperty<*>): Int = 1
}
fun box(): String {
val prop: Int by Delegate()
return if (prop == 1) "OK" else "fail"
}