Generate bytecode for delegated properties

This commit is contained in:
Natalia.Ukhorskaya
2013-04-22 13:59:37 +04:00
parent 3297c0e9d3
commit 6e2584d0de
33 changed files with 731 additions and 50 deletions
@@ -0,0 +1,21 @@
class Delegate {
var inner = 1
fun get(t: Any?, p: String): Int = inner
fun set(t: Any?, p: String, i: Int) { inner = i }
}
class B {
private var value: Int by Delegate()
public fun test() {
fun foo() {
value = 1
}
foo()
}
}
fun box(): String {
B().test()
return "OK"
}