aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-09-18 12:19:13 +0200
committerEugen Wissner <belka@caraus.de>2026-09-18 12:19:13 +0200
commitdc9d03915c4b169fec749081b45d56f722105813 (patch)
tree0a0719bc95f942b675fb52865d9c5bac9e105767 /testsuite
parentb575036fe804f14b78da74897a74b010cc94f730 (diff)
downloadelna-dc9d03915c4b169fec749081b45d56f722105813.tar.gz
Allow block-local variables
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/runnable/block_local_variable.elna14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/runnable/block_local_variable.elna b/testsuite/runnable/block_local_variable.elna
new file mode 100644
index 0000000..6287eec
--- /dev/null
+++ b/testsuite/runnable/block_local_variable.elna
@@ -0,0 +1,14 @@
+program()
+var
+ total: Int := 0
+begin
+ if total = 0 then
+ var
+ inner: Int := 7
+ begin
+ total := total + inner
+ end;
+ assert(total = 7)
+return 0u8
+
+end.