diff options
| author | 2026-10-15 17:03:03 +0330 | |
|---|---|---|
| committer | 2026-10-15 17:03:03 +0330 | |
| commit | 7cb983bbea98d2038b2a8015a6d1f1afd40991c9 (patch) | |
| tree | ec3d88a15801207fc6d8d3c6d142617ffec85460 /tests/hold/accept/monitor.zc | |
| parent | merge work/borrow: borrow returns before definition, borrows clause, borrow m... (diff) | |
| parent | bench: 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/accept/monitor.zc')
| -rw-r--r-- | tests/hold/accept/monitor.zc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/hold/accept/monitor.zc b/tests/hold/accept/monitor.zc new file mode 100644 index 0000000..7dfe6f0 --- /dev/null +++ b/tests/hold/accept/monitor.zc @@ -0,0 +1,15 @@ +// expect: 902 +namespace; +include rt; +hold { + shared let c = 5; + shared int[3] hist; + fn bump(int k) { c = c + k; hist[0]++; return c; } + fn twice(int k) { bump(k); return bump(k); } + fn get() { return c * 100 + hist[0]; } +} +fn main() { + twice(2); + rt.put_n(get()); rt.put_c(10); + return 0; +} |
