Report 'break or continue outside a loop'

for break/continue outside a loop body (e.g. in loop condition)

 #KT-5724 Fixed
This commit is contained in:
Svetlana Isakova
2014-09-01 19:01:47 +04:00
parent 0b4f313b6d
commit 61dc110cc7
22 changed files with 355 additions and 275 deletions
@@ -13,7 +13,7 @@ L0:
mark("before")
r("before") -> <v0>
L2 [loop entry point]:
L5 [condition entry point]:
L6 [condition entry point]:
r(true) -> <v1>
mark(while (true) { val a: Int })
magic[VALUE_CONSUMER](true|<v1>) -> <v2>
@@ -22,6 +22,7 @@ L4 [body entry point]:
v(val a: Int) INIT: in: {} out: {a=D}
2 jmp(L2 [loop entry point]) INIT: in: {} out: {} USE: in: {} out: {}
L3 [loop exit point]:
L5 [body exit point]:
- read (Unit)
- mark("after")
- r("after") -> <v3>