From 25aa655e5b9464e291d542081ed1cf0f8fd666af Mon Sep 17 00:00:00 2001 From: zinc Date: Thu, 15 Oct 2026 14:33:28 +0330 Subject: hold: fixtures (accept, reject, race, rank order) and tests/drivers/hold_test.py --- tests/hold/reject/order.zc | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/hold/reject/order.zc (limited to 'tests/hold/reject/order.zc') 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; } -- cgit v1.2.3