Handle break/continue in loop header (condition for 'while', range for 'for').
This commit is contained in:
committed by
Dmitry Petrov
parent
b3866d53cd
commit
d623c70778
@@ -0,0 +1,23 @@
|
||||
fun test1(c: Boolean?) {
|
||||
L@ while (true) {
|
||||
while (c ?: break)
|
||||
}
|
||||
}
|
||||
|
||||
fun test2(c: Boolean?) {
|
||||
L@ while (true) {
|
||||
while (c ?: continue)
|
||||
}
|
||||
}
|
||||
|
||||
fun test3(ss: List<String>?) {
|
||||
L@ while (true) {
|
||||
for (s in ss ?: continue)
|
||||
}
|
||||
}
|
||||
|
||||
fun test4(ss: List<String>?) {
|
||||
L@ while (true) {
|
||||
for (s in ss ?: break)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user