9a2eff6487
https://youtrack.jetbrains.com/issue/KT-60264/K2-while-loop-body-block-sometimes-replaced-with-single-expression Merge-request: KT-MR-12035 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
41 lines
667 B
Kotlin
Vendored
41 lines
667 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
fun test1() {
|
|
while (true) { break }
|
|
do { break } while (true)
|
|
while (true) { continue }
|
|
do { continue } while (true)
|
|
}
|
|
|
|
fun test2() {
|
|
OUTER@while(true) {
|
|
INNER@while(true) {
|
|
break@INNER
|
|
break@OUTER
|
|
}
|
|
break@OUTER
|
|
}
|
|
OUTER@while(true) {
|
|
INNER@while(true) {
|
|
continue@INNER
|
|
continue@OUTER
|
|
}
|
|
continue@OUTER
|
|
}
|
|
}
|
|
|
|
fun test3() {
|
|
L@while(true) {
|
|
L@while(true) {
|
|
break@L
|
|
}
|
|
break@L
|
|
}
|
|
L@while(true) {
|
|
L@while(true) {
|
|
continue@L
|
|
}
|
|
continue@L
|
|
}
|
|
}
|
|
|