aboutsummaryrefslogtreecommitdiff
path: root/tests/hold/reject/order.zc
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-15 17:03:03 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-15 17:03:03 +0330
commit7cb983bbea98d2038b2a8015a6d1f1afd40991c9 (patch)
treeec3d88a15801207fc6d8d3c6d142617ffec85460 /tests/hold/reject/order.zc
parentmerge work/borrow: borrow returns before definition, borrows clause, borrow m... (diff)
parentbench: rss probe path fix (diff)
merge work/actors: wasm seed bootstrap (seed/MANIFEST), shared copy-on-write actor memory, top-level hold blocks on all backends and lsp
Diffstat (limited to 'tests/hold/reject/order.zc')
-rw-r--r--tests/hold/reject/order.zc7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/hold/reject/order.zc b/tests/hold/reject/order.zc
new file mode 100644
index 0000000..9a2943b
--- /dev/null
+++ b/tests/hold/reject/order.zc
@@ -0,0 +1,7 @@
+// trap: was entered while
+// blocks are entered in declaration order; going back to an earlier block while a later one is held stops the program
+namespace;
+include rt;
+hold { shared let a; fn ga() { a++; return a; } }
+hold { shared let b; fn gb() { b++; return ga(); } }
+fn main() { rt.put_n(gb()); rt.put_c(10); return 0; }