Do not add a new label to labeled loop

Relevant situation: break / continue in when #KT-16128 Fixed
This commit is contained in:
mglukhikh
2017-03-31 16:22:03 +03:00
committed by Mikhail Glukhikh
parent d9e1e82948
commit 6277476573
6 changed files with 84 additions and 8 deletions
+14
View File
@@ -0,0 +1,14 @@
// "Add '@loop' to continue" "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' -> continue<caret>
}
pos++
}
}