diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-05-01 22:43:13 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-05-01 22:43:13 +0300 |
| commit | db3809488805fbdcd9d726d9ed45ad7335812bd1 (patch) | |
| tree | dcf1ceb68a7d77733a474825a9804fe99d253b48 /examples/references.fwd | |
| parent | f1e9860ab638594e95db0ada848157b860eeb831 (diff) | |
| download | fwd-db3809488805fbdcd9d726d9ed45ad7335812bd1.tar.gz fwd-db3809488805fbdcd9d726d9ed45ad7335812bd1.zip | |
+ Might come up with proper examples at some point, but for now tests at
least tell us if they're broken
Diffstat (limited to 'examples/references.fwd')
| -rw-r--r-- | examples/references.fwd | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/examples/references.fwd b/examples/references.fwd deleted file mode 100644 index 5b73aaf..0000000 --- a/examples/references.fwd +++ /dev/null @@ -1,24 +0,0 @@ -references(&int a, &int b, () r) -{ - /* don't have assignment and not quite sure if I want to have to - * dereference references so I guess we can't really do much here at the - * moment, heh */ - r(); -} - -main() -{ - 20 => int twenty; - 30 => int thirty; - references(twenty&, thirty&) => { - 20 + 30 => int fifty; /* ok */ - }; - - /* references are not active anymore so we can reference again */ - references(twenty&, thirty&) => { - /* Try uncommenting! - * Not ok since twenty/thirty is actively borrowed - */ - // twenty + thirty => int fifty; - }; -} |
