mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 00:59:31 +00:00
Variable must now be explicitly marked as persistent
This commit is contained in:
parent
e9606cdee0
commit
2c6d66c222
11 changed files with 384 additions and 106 deletions
44
test/tests/function scoped nested.ans
Normal file
44
test/tests/function scoped nested.ans
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
:$ f()
|
||||
:a = 1
|
||||
|
||||
{a}
|
||||
|
||||
~ a := a + 1
|
||||
|
||||
:$ g
|
||||
:a = 1
|
||||
|
||||
{a}
|
||||
|
||||
~ a := a + 1
|
||||
|
||||
:$ h()
|
||||
:a = 1
|
||||
|
||||
{a}
|
||||
|
||||
~ a := a + 1
|
||||
|
||||
\> depth 2, unscoped:
|
||||
|
||||
~ g
|
||||
|
||||
~ g
|
||||
|
||||
~ g
|
||||
|
||||
\> depth 2, scoped:
|
||||
|
||||
~ h
|
||||
|
||||
~ h
|
||||
|
||||
~ h
|
||||
|
||||
depth 1:
|
||||
|
||||
~ f
|
||||
|
||||
~ f
|
||||
|
||||
~ f
|
||||
Loading…
Add table
Add a link
Reference in a new issue