Files
openide/plugins/kotlin/idea/tests/testData/refactoring/introduceVariable/arrayAssignment.kt
T
Alexey Sedunov 665904df40 Introduce Variable: Do not replace assignment left-hand sides
#KT-14240 Fixed

GitOrigin-RevId: f2af7166af5662f5b49c7a5418a03afc67812f30
2016-10-13 19:00:58 +03:00

8 lines
173 B
Kotlin

// WITH_RUNTIME
class Foo(var bar: IntArray)
fun test() {
val foo = Foo(IntArray(1) { 1 })
println(<selection>foo.bar</selection>)
foo.bar[0] = foo.bar[0] + 1
}