Tests for when / break / continue fixed
This commit is contained in:
@@ -4,9 +4,9 @@ package foo
|
|||||||
fun box(): Boolean {
|
fun box(): Boolean {
|
||||||
var result = false
|
var result = false
|
||||||
var i = 1
|
var i = 1
|
||||||
while(i==1)
|
@loop while(i==1)
|
||||||
when (i) {
|
when (i) {
|
||||||
1 -> { result = true; break }
|
1 -> { result = true; break@loop }
|
||||||
else -> result = false
|
else -> result = false
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ class CanvasState(val canvas: HTMLCanvasElement) {
|
|||||||
{
|
{
|
||||||
jq(canvas).click {
|
jq(canvas).click {
|
||||||
val mousePos = mousePos(it)
|
val mousePos = mousePos(it)
|
||||||
for (shape in shapes) {
|
@shapeLoop for (shape in shapes) {
|
||||||
if (shape is Button && mousePos in shape) {
|
if (shape is Button && mousePos in shape) {
|
||||||
val name = shape.src
|
val name = shape.src
|
||||||
shape.mouseClick()
|
shape.mouseClick()
|
||||||
@@ -401,7 +401,7 @@ class CanvasState(val canvas: HTMLCanvasElement) {
|
|||||||
trafficLightDown.setGreen()
|
trafficLightDown.setGreen()
|
||||||
|
|
||||||
}
|
}
|
||||||
else -> continue
|
else -> continue@shapeLoop
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user