KT-4820: Intention to remove an unused index variable from a for loop.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
//IS_APPLICABLE: FALSE
|
||||
fun foo(bar: List<String>) {
|
||||
for (<caret>a in bar) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// IS_APPLICABLE: FALSE
|
||||
//ERROR: Unresolved reference: withIndices
|
||||
fun foo(b: List<Int>) {
|
||||
for ((i, <caret>c) in b.withIndices()) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
//ERROR: Unresolved reference: withIndices
|
||||
fun foo(bar: List<Int>) {
|
||||
for ((i : <caret>Int, b: Int) in bar.withIndices()) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
//ERROR: Unresolved reference: withIndices
|
||||
fun foo(bar: List<Int>) {
|
||||
for (b: Int in bar) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
//ERROR: Unresolved reference: withIndices
|
||||
fun foo(bar: List<String>) {
|
||||
for ((i,<caret>a) in bar.withIndices()) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
//ERROR: Unresolved reference: withIndices
|
||||
fun foo(bar: List<String>) {
|
||||
for (a in bar) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user