Files
kotlin/idea/testData/quickfix/when/breakInWhenInLabeled.kt
mglukhikh 6277476573 Do not add a new label to labeled loop
Relevant situation: break / continue in when #KT-16128 Fixed
2017-04-05 15:40:08 +03:00

14 lines
265 B
Kotlin
Vendored

// "Add '@loop' to break" "true"
// WITH_RUNTIME
fun foo(chars: CharArray) {
val length = chars.size
var pos = 0
loop@ while (pos < length) {
val c = chars[pos]
when (c) {
'\n' -> br<caret>eak
}
pos++
}
}