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