diff --git a/test/asm/for-loop-variable.asm b/test/asm/for-loop-variable.asm new file mode 100644 index 00000000..8d0be549 --- /dev/null +++ b/test/asm/for-loop-variable.asm @@ -0,0 +1,13 @@ +def x = 4 +for x, x + def x *= 2 + println x +endr +println x + +def y equ 5 +for y, y + def y *= 3 + println y +endr +println y diff --git a/test/asm/for-loop-variable.err b/test/asm/for-loop-variable.err new file mode 100644 index 00000000..b8893821 --- /dev/null +++ b/test/asm/for-loop-variable.err @@ -0,0 +1,3 @@ +error: for-loop-variable.asm(12): + 'y' already defined as constant at for-loop-variable.asm(8) +error: Assembly aborted (1 error)! diff --git a/test/asm/for-loop-variable.out b/test/asm/for-loop-variable.out new file mode 100644 index 00000000..8627d353 --- /dev/null +++ b/test/asm/for-loop-variable.out @@ -0,0 +1,6 @@ +$0 +$2 +$4 +$6 +$4 +$5