Files
kotlin-fork/idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_mustBeNoIndexInCondition.kt
T
2016-08-23 22:47:42 +03:00

12 lines
260 B
Kotlin
Vendored

// WITH_RUNTIME
// IS_APPLICABLE: false
// IS_APPLICABLE_2: false
fun foo(list: List<String>) {
var result = -1
<caret>for ((index, s) in list.withIndex()) {
if (s.length > index) {
result = index
break
}
}
}