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
+25
View File
@@ -0,0 +1,25 @@
// FILE: 1.kt
package test
var value: Int = 0
inline var z: Int
get() = ++value
set(p: Int) { value = p }
// FILE: 2.kt
import test.*
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 "OK"
}