// Build: build/flecha build examples/checked_references.fl -o build/checked_references
// Prints 6 and exits with 6.
void double_value(&u8 value) {
u8 read_value(&const u8 value) {
double_value(ref); // A call reborrows; ref remains usable.
stdoutln(read_value(ref));
// The last use of ref has passed, so value is accessible directly.
moved := moving; // moving cannot be read until reassigned.
constref u8 fixed = &other; // const &u8: fixed binding, writable target.
&const u8 shared = &other;
copy := shared; // Shared handles may be copied.
if *copy != *shared { return 1; }
slot := &pointer; // &*u8: a checked reference to a raw-pointer variable.
*slot = none; // Safe access to the pointer slot; no pointee access.