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:
@@ -9,7 +9,7 @@ L0:
|
||||
1 <START>
|
||||
2 mark({ while(0 > 1) { 2 } })
|
||||
L2 [loop entry point]:
|
||||
L5 [condition entry point]:
|
||||
L6 [condition entry point]:
|
||||
r(0) -> <v0> PREV:[mark({ while(0 > 1) { 2 } }), jmp(L2 [loop entry point])]
|
||||
r(1) -> <v1>
|
||||
mark(0 > 1)
|
||||
@@ -21,6 +21,7 @@ L4 [body entry point]:
|
||||
r(2) -> <v3>
|
||||
2 jmp(L2 [loop entry point]) NEXT:[r(0) -> <v0>]
|
||||
L3 [loop exit point]:
|
||||
L5 [body exit point]:
|
||||
read (Unit) PREV:[jf(L3 [loop exit point]|<v2>)]
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>]
|
||||
@@ -43,7 +44,8 @@ L2 [loop entry point]:
|
||||
L4 [body entry point]:
|
||||
mark({return})
|
||||
ret L1 NEXT:[<END>]
|
||||
L5 [condition entry point]:
|
||||
L5 [body exit point]:
|
||||
L6 [condition entry point]:
|
||||
- r(0) -> <v1> PREV:[]
|
||||
- r(1) -> <v2> PREV:[]
|
||||
- mark(0 > 1) PREV:[]
|
||||
|
||||
Reference in New Issue
Block a user