Added inspection based on RemoveForLoopIndicesIntention

This commit is contained in:
Valentin Kipyatkov
2015-07-21 14:04:51 +03:00
parent 6b0fc8391f
commit 6339ad4ec6
10 changed files with 32 additions and 10 deletions
@@ -2,7 +2,7 @@
// WITH_RUNTIME
fun foo(b: List<Int>) : Int {
for ((i, <caret>c) in b.withIndex()) {
for ((<caret>i, c) in b.withIndex()) {
return i
}
return 0
@@ -1,6 +1,6 @@
// WITH_RUNTIME
fun foo(bar: List<Int>) {
for ((i : <caret>Int, b: Int) in bar.withIndex()) {
for ((i<caret> : Int, b: Int) in bar.withIndex()) {
}
}
@@ -1,6 +1,6 @@
// WITH_RUNTIME
fun foo(bar: List<String>) {
for ((i,<caret>a) in bar.withIndex()) {
for ((i<caret>,a) in bar.withIndex()) {
}
}