Files
kotlin-fork/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.kt
T
2023-03-22 15:18:16 +00:00

21 lines
281 B
Kotlin
Vendored

// IGNORE_BACKEND_K2: JS_IR
// IGNORE_BACKEND_K2: JS_IR_ES6
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]++
}