aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2026-01-06 15:51:30 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2026-01-06 17:19:52 +0200
commit64146b46da45ce69ab380add00459f7b60fe9196 (patch)
tree5240054c5cf52aca07bb2096bbcbcd025726be43 /examples
parentc7b41b47d038fd4973da05224b7aa29efaae1784 (diff)
downloadfwd-64146b46da45ce69ab380add00459f7b60fe9196.tar.gz
fwd-64146b46da45ce69ab380add00459f7b60fe9196.zip
allow omitting ';' in trivial calls
Diffstat (limited to 'examples')
-rw-r--r--examples/vec.fwd2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/vec.fwd b/examples/vec.fwd
index 6c854d5..f7838f1 100644
--- a/examples/vec.fwd
+++ b/examples/vec.fwd
@@ -67,7 +67,7 @@ append_vec(vec v, i64 e, (vec) ok)
at_vec(vec v, u64 i, (vec, &i64) ok)
{
v => [n => n, s => s, buf => buf];
- if i >= n {fwdpanic("bounds error");}
+ guard(i < n) => {fwdpanic("bounds error")} => ;
fwdptradd(buf, (i * sizeof(i64)) as i64) => *i64 buf;
nil buf {fwdpanic("should never happen");} => &i64 bufr;
ok([n => n, s => s, buf => buf] vec, bufr);