mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 00:21:32 +00:00
14 lines
265 B
Kotlin
Vendored
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++
|
|
}
|
|
} |