Files
kotlin-fork/compiler/testData/ir/irText/incrementDecrement.kt
T
Dmitry Petrov 4a62a6b7c3 Prefix increment / decrement.
Refactor IrLValue.
2016-10-18 09:08:14 +03:00

18 lines
230 B
Kotlin
Vendored

var p: Int = 0
val arr = intArrayOf(1, 2, 3)
fun testVar() {
var x = 0
val x1 = ++x
val x2 = --x
}
fun testProp() {
val p1 = ++p
val p2 = --p
}
fun testArray() {
val a1 = ++arr[0]
val a2 = --arr[0]
}