module Test { struct T{v: u64} public new(g: u64): V#Self.T { return T{g: move(g)}; } public thousand(t : &mut V#Self.T) { *(&mut move(t).v) = 1000; return; } public value(this: &mut V#Self.T): u64 { let y: &u64; y = &move(this).v; return *move(y); } } //! new-transaction import {{default}}.Test; main() { let x: V#Test.T; let x_ref: u64; x = Test.new(500); Test.thousand(&mut x); x_ref = Test.value(&mut x); assert(move(x_ref) == 1000, 42); return; }