diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-09 22:26:02 +0200 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-09 22:26:02 +0200 |
commit | 598be4cd1bdd79e4859ae30291f4d65682cc672a (patch) | |
tree | 6e7e7ad537214c78049c4b3b2ee694c3b549fa4e /examples/pure_move.fwd | |
parent | 6f7c2d6daa5c706d441ddc42c5c6409e5266049a (diff) | |
download | fwd-598be4cd1bdd79e4859ae30291f4d65682cc672a.tar.gz fwd-598be4cd1bdd79e4859ae30291f4d65682cc672a.zip |
initial reference checking
Diffstat (limited to 'examples/pure_move.fwd')
-rw-r--r-- | examples/pure_move.fwd | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/pure_move.fwd b/examples/pure_move.fwd new file mode 100644 index 0000000..a00666e --- /dev/null +++ b/examples/pure_move.fwd @@ -0,0 +1,14 @@ +requires_pure(&() p) +{ + p(); +} + +main() +{ + 20 => int twenty; + requires_pure() &=> { + /* not allowed in pure context (though primitives should maybe + * be excluded just to make people's lives easier?) */ + twenty + 10 => int thirty; + } +} |