diff options
| author | 2026-10-15 14:33:28 +0330 | |
|---|---|---|
| committer | 2026-10-15 14:33:28 +0330 | |
| commit | 25aa655e5b9464e291d542081ed1cf0f8fd666af (patch) | |
| tree | fb2fa4b3e77914ab00829b39142a2f8cfb3a9d8b /tests/hold/reject/order.zc | |
| parent | hold blocks: top-level hold { shared let ...; fn ... } monitors; shared value... (diff) | |
hold: fixtures (accept, reject, race, rank order) and tests/drivers/hold_test.py
Diffstat (limited to 'tests/hold/reject/order.zc')
| -rw-r--r-- | tests/hold/reject/order.zc | 7 |
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; } |
