fix function call arg type mismatch crash

This commit is contained in:
Irmen de Jong 2020-03-15 00:47:21 +01:00
parent 68ce4a1bf0
commit 835555171e
3 changed files with 3 additions and 11 deletions

View File

@ -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)
}
}

View File

@ -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)

View File

@ -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()