diff --git a/compiler/src/prog8/ast/processing/AstChecker.kt b/compiler/src/prog8/ast/processing/AstChecker.kt index 1dca4ba5e..ac314a032 100644 --- a/compiler/src/prog8/ast/processing/AstChecker.kt +++ b/compiler/src/prog8/ast/processing/AstChecker.kt @@ -1066,6 +1066,8 @@ internal class AstChecker(private val program: Program, if(stmt is Return && index < statements.lastIndex) errors.warn("unreachable code, return statement above", statements[index+1].position) + + stmt.accept(this) } } diff --git a/examples/lines-circles.p8 b/examples/lines-circles.p8 index 1baff3981..2a825aa3b 100644 --- a/examples/lines-circles.p8 +++ b/examples/lines-circles.p8 @@ -24,8 +24,6 @@ main { line(20, 4, 10, 24) line(39, 16, 12, 0) - ; TODO fix crash arg type incompatible c64scr.setcc(x0, y0 + radius, 81, 1) - sub line(ubyte x1, ubyte y1, ubyte x2, ubyte y2) { byte d = 0 ubyte dx = abs(x2 - x1) diff --git a/examples/test.p8 b/examples/test.p8 index bba8d407a..cec9d29d2 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -1,17 +1,9 @@ +%import c64utils %zeropage basicsafe main { sub start() { - if A>Y { - label1: - Y=0 - goto label1 - } else { - label2: - Y=1 - goto label2 - } c64scr.print("spstart:") print_stackpointer()