Files
kotlin-fork/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.kt
T
Dmitry Petrov 0b647ac358 Basic class members generation.
Split testData into 'classes' and 'expressions'.
2016-10-18 09:08:32 +03:00

17 lines
219 B
Kotlin
Vendored

fun foo(): IntArray = intArrayOf(1, 2, 3)
fun bar() = 42
class C(val x: IntArray)
fun testVariable() {
var x = foo()
x[0] += 1
}
fun testCall() {
foo()[bar()] *= 2
}
fun testMember(c: C) {
c.x[0]++
}