Add test case for FOR loop variable reusing an existing one

This commit is contained in:
Rangi42
2025-04-22 15:10:50 -04:00
parent 0b7cda9e0c
commit 762e2311d2
3 changed files with 22 additions and 0 deletions

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
$0
$2
$4
$6
$4
$5