KT-4820: Intention to remove an unused index variable from a for loop.

This commit is contained in:
Ross Hanson
2014-04-21 09:31:28 -04:00
parent 97010c7d7f
commit 35c5a62b11
15 changed files with 174 additions and 2 deletions
@@ -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) {
}
}