Support references to top level and member properties in JVM codegen

#KT-1183 In Progress
This commit is contained in:
Alexander Udalov
2014-06-06 17:11:45 +04:00
parent 59777e7df6
commit 461cce103b
19 changed files with 457 additions and 12 deletions
@@ -0,0 +1,16 @@
data class Box(var value: String)
fun box(): String {
val o = Box("lorem")
val prop = Box::value
if (prop.get(o) != "lorem") return "Fail 1: ${prop[o]}"
prop.set(o, "ipsum")
if (prop.get(o) != "ipsum") return "Fail 2: ${prop[o]}"
if (o.value != "ipsum") return "Fail 3: ${o.value}"
o.value = "dolor"
if (prop.get(o) != "dolor") return "Fail 4: ${prop.get(o)}"
if ("$o" != "Box(value=dolor)") return "Fail 5: $o"
return "OK"
}