mirror of
https://github.com/irmen/prog8.git
synced 2025-02-28 09:29:26 +00:00
fix function call arg type mismatch crash
This commit is contained in:
parent
68ce4a1bf0
commit
835555171e
@ -1066,6 +1066,8 @@ internal class AstChecker(private val program: Program,
|
|||||||
|
|
||||||
if(stmt is Return && index < statements.lastIndex)
|
if(stmt is Return && index < statements.lastIndex)
|
||||||
errors.warn("unreachable code, return statement above", statements[index+1].position)
|
errors.warn("unreachable code, return statement above", statements[index+1].position)
|
||||||
|
|
||||||
|
stmt.accept(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,8 +24,6 @@ main {
|
|||||||
line(20, 4, 10, 24)
|
line(20, 4, 10, 24)
|
||||||
line(39, 16, 12, 0)
|
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) {
|
sub line(ubyte x1, ubyte y1, ubyte x2, ubyte y2) {
|
||||||
byte d = 0
|
byte d = 0
|
||||||
ubyte dx = abs(x2 - x1)
|
ubyte dx = abs(x2 - x1)
|
||||||
|
@ -1,17 +1,9 @@
|
|||||||
|
%import c64utils
|
||||||
%zeropage basicsafe
|
%zeropage basicsafe
|
||||||
|
|
||||||
main {
|
main {
|
||||||
|
|
||||||
sub start() {
|
sub start() {
|
||||||
if A>Y {
|
|
||||||
label1:
|
|
||||||
Y=0
|
|
||||||
goto label1
|
|
||||||
} else {
|
|
||||||
label2:
|
|
||||||
Y=1
|
|
||||||
goto label2
|
|
||||||
}
|
|
||||||
|
|
||||||
c64scr.print("spstart:")
|
c64scr.print("spstart:")
|
||||||
print_stackpointer()
|
print_stackpointer()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user