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