Handle unresolved break/continue expressions as error expressions.

This commit is contained in:
Dmitry Petrov
2016-09-06 17:45:39 +03:00
committed by Dmitry Petrov
parent c0ac607a1d
commit 0da4c08520
4 changed files with 74 additions and 5 deletions
@@ -0,0 +1,27 @@
// !IGNORE_ERRORS
fun test1() {
break
continue
}
fun test2() {
L1@ while (true) {
break@ERROR
continue@ERROR
}
}
fun test3() {
L1@ while (true) {
val lambda = {
break@L1
continue@L1
}
}
}
fun test4() {
while (break) {}
while (continue) {}
}