Fixed index variable case

This commit is contained in:
Valentin Kipyatkov
2016-10-17 18:08:38 +03:00
parent e5fcfae969
commit 5c8db294df
4 changed files with 39 additions and 10 deletions
@@ -0,0 +1,9 @@
// WITH_RUNTIME
// IS_APPLICABLE: false
// IS_APPLICABLE_2: false
fun foo(list: List<Any>, out: MutableList<String>){
<caret>for ((i, any) in list.withIndex()) {
if (any is String && i % 2 == 0)
out.add(any)
}
}