Base support of StackValue.Property inlining

This commit is contained in:
Mikhael Bogdanov
2016-06-21 11:18:40 +03:00
parent d524a34fc7
commit 5a2e00d2ad
12 changed files with 244 additions and 46 deletions

View File

@@ -0,0 +1,24 @@
package test
var value: Int = 0
inline var z: Int
get() = ++value
set(p: Int) { value = p }
fun box(): String {
val v = z
if (value != 1) return "fail 1: $value"
z = v + 2
if (value != 3) return "fail 2: $value"
var p = z
if (value != 4) return "fail 3: $value"
return "OK1"
}
// 0 SimpleKt.getZ
// 0 SimpleKt.setZ