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

17 lines
343 B
Kotlin
Vendored

// WITH_RUNTIME
// IS_APPLICABLE: false
// IS_APPLICABLE_2: false
fun foo() {
MainLoop@
for (i in 1..10) {
var result: String? = null
<caret>for (s in list()) {
if (s.length > 0) {
result = s
break@MainLoop
}
}
}
}
fun list(): List<String> = listOf()