Files
kotlin-fork/idea/testData/intentions/useWithIndex/simple.kt
T
2016-08-16 17:38:13 +03:00

10 lines
199 B
Kotlin
Vendored

// WITH_RUNTIME
fun foo(list: List<String>): Int? {
var index = 0
<caret>for (s in list) {
val x = s.length * index
index++
if (x > 0) return x
}
return null
}