KT-9628 Intention&inspection to replace use of "set" operator function with []
#KT-9628 Fixed
This commit is contained in:
+2
-2
@@ -3,13 +3,13 @@ import java.util.ArrayList
|
||||
internal class C {
|
||||
fun foo1(list: MutableList<String>) {
|
||||
for (i in list.indices) {
|
||||
list.set(i, "a")
|
||||
list[i] = "a"
|
||||
}
|
||||
}
|
||||
|
||||
fun foo2(list: ArrayList<String>) {
|
||||
for (i in list.indices) {
|
||||
list.set(i, "a")
|
||||
list[i] = "a"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import java.util.ArrayList
|
||||
internal class C {
|
||||
fun foo(list: MutableList<String>) {
|
||||
for (i in list.indices) {
|
||||
list.set(i, "a")
|
||||
list[i] = "a"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user