IR: augmented assignment for array access expressions
This commit is contained in:
committed by
Dmitry Petrov
parent
0a57eb8ea4
commit
d7412c449e
+17
-4
@@ -1,6 +1,19 @@
|
||||
// <<< augmentedAssignment1.txt
|
||||
fun test(): Int {
|
||||
var p = 0
|
||||
|
||||
fun testVariable() {
|
||||
var x = 0
|
||||
x += 10
|
||||
return x
|
||||
}
|
||||
x += 1
|
||||
x -= 2
|
||||
x *= 3
|
||||
x /= 4
|
||||
x %= 5
|
||||
}
|
||||
|
||||
fun testProperty() {
|
||||
p += 1
|
||||
p -= 2
|
||||
p *= 3
|
||||
p /= 4
|
||||
p %= 5
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user