diff options
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; - }; -} |
