Assignments to qualified expressions are supported in CF

This commit is contained in:
Andrey Breslav
2011-04-15 19:16:31 +04:00
parent fad3030e37
commit b94579a4ba
3 changed files with 21 additions and 0 deletions
@@ -8,6 +8,9 @@ fun assignments() : Unit {
val y = true && false
val z = false && true
val t = new Test();
t.x = 1
}
---------------------
l0:
@@ -40,6 +43,12 @@ l4:
l5:
r(false && true)
w(z)
r(new Test())
w(t)
r(1)
r(t)
r(=)
w(t.x)
l1:
<END>
error:
+7
View File
@@ -1,3 +1,7 @@
class Test {
var x : Int;
}
fun assignments() : Unit {
var x = 1
x = 2
@@ -7,4 +11,7 @@ fun assignments() : Unit {
val y = true && false
val z = false && true
val t = new Test();
t.x = 1
}