module M { struct T {v : u64} public new(v: u64): V#Self.T { return T{v: move(v)}; } public value (this: &mut V#Self.T) : u64 { let b: &u64; b = &move(this).v; return *move(b); } } //! new-transaction import {{default}}.M; main() { let x: V#M.T; let y: &mut V#M.T; let z: u64; x = M.new(5); y = &mut x; z = M.value(move(y)); assert(move(z) == 5, 42); return; }