diff --git a/src/alu.c b/src/alu.c index 31e1654..9bc8a4f 100644 --- a/src/alu.c +++ b/src/alu.c @@ -1460,6 +1460,7 @@ static void int_handle_dyadic_operator(struct object *self, struct op *op, struc self->u.number.val.intval = ((uintval_t) (self->u.number.val.intval)) >> other->u.number.val.intval; break; case OPID_LESSOREQUAL: +// FIXME - all comparison results should clear all force bits and set fits_byte! also for floats! self->u.number.val.intval = (self->u.number.val.intval <= other->u.number.val.intval); break; case OPID_LESSTHAN: diff --git a/testing/errors/alreadydefined1.a b/testing/errors/alreadydefined1.a new file mode 100644 index 0000000..28583ab --- /dev/null +++ b/testing/errors/alreadydefined1.a @@ -0,0 +1,2 @@ + a = 3 + a = 3.0 ; -> "already defined" (type has changed) diff --git a/testing/errors/alreadydefined2.a b/testing/errors/alreadydefined2.a new file mode 100644 index 0000000..23123de --- /dev/null +++ b/testing/errors/alreadydefined2.a @@ -0,0 +1,2 @@ + a = 3 + a = 4 ; -> "already defined" (value has changed) diff --git a/testing/errors/alreadydefined3.a b/testing/errors/alreadydefined3.a new file mode 100644 index 0000000..6daccf4 --- /dev/null +++ b/testing/errors/alreadydefined3.a @@ -0,0 +1,4 @@ + *=$1000 +label + nop +label ; -> already defined diff --git a/testing/errors/toolateforpostfix1.a b/testing/errors/toolateforpostfix1.a new file mode 100644 index 0000000..62a4ab1 --- /dev/null +++ b/testing/errors/toolateforpostfix1.a @@ -0,0 +1,3 @@ + a = 3 + b = a ; read a + a+2 = 3 ; -> "too late for postfix" diff --git a/testing/errors/toolateforpostfix2.a b/testing/errors/toolateforpostfix2.a new file mode 100644 index 0000000..0ba2f8e --- /dev/null +++ b/testing/errors/toolateforpostfix2.a @@ -0,0 +1,4 @@ + *=$1000 +label + b = label ; read symbol +label+2 ; -> too late for postfix