Files
kotlin-fork/idea/testData/intentions/loopToCallChain/firstOrNull_ifAssign_variableUsedBefore.kt
T
2016-08-16 17:37:55 +03:00

11 lines
215 B
Kotlin
Vendored

// WITH_RUNTIME
// IS_APPLICABLE: false
fun foo(list: List<String>) {
var result: String? = null
<caret>for (s in list) {
if (s != result) {
result = s
break
}
}
}