7898d167f3
"so that variables declared in loop body are not visible outside of the
loop" (from commit d096f1d)
39 lines
609 B
Plaintext
Vendored
39 lines
609 B
Plaintext
Vendored
fun test1() {
|
|
while (true) break
|
|
{ // BLOCK
|
|
dobreak while (true)
|
|
}
|
|
while (true) continue
|
|
{ // BLOCK
|
|
docontinue while (true)
|
|
}
|
|
}
|
|
|
|
fun test2() {
|
|
OUTER@ while (true) { // BLOCK
|
|
INNER@ while (true) { // BLOCK
|
|
break@INNER
|
|
break@OUTER
|
|
}
|
|
break@OUTER
|
|
}
|
|
OUTER@ while (true) { // BLOCK
|
|
INNER@ while (true) { // BLOCK
|
|
continue@INNER
|
|
continue@OUTER
|
|
}
|
|
continue@OUTER
|
|
}
|
|
}
|
|
|
|
fun test3() {
|
|
L@ while (true) { // BLOCK
|
|
L@ while (true) break@L
|
|
break@L
|
|
}
|
|
L@ while (true) { // BLOCK
|
|
L@ while (true) continue@L
|
|
continue@L
|
|
}
|
|
}
|