mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 00:59:31 +00:00
Fix scoping with mutable variables
This commit is contained in:
parent
16d0bb8d7a
commit
bb45cc8fdd
16 changed files with 1243 additions and 38 deletions
38
test/tests/scope checkpoint mutable error.ans
Normal file
38
test/tests/scope checkpoint mutable error.ans
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
:post run = "check"
|
||||
|
||||
:l = [1]
|
||||
|
||||
:n = 0
|
||||
|
||||
$ f(t)
|
||||
~ t!insert(len(l)+1)
|
||||
|
||||
f1: {l} {t}
|
||||
|
||||
CHECK
|
||||
§ c
|
||||
|
||||
~ n < 1
|
||||
REC
|
||||
|
||||
~ n += 1
|
||||
~ f(t)
|
||||
|
||||
END REC
|
||||
|
||||
~ t!insert(len(t)+1)
|
||||
|
||||
~ error("t")
|
||||
|
||||
f2: {l}
|
||||
|
||||
~ f(l)
|
||||
|
||||
FINAL
|
||||
|
||||
l: {l}
|
||||
|
||||
$ check
|
||||
AFTER ERROR
|
||||
|
||||
l: {l}
|
||||
Loading…
Add table
Add a link
Reference in a new issue