module B { struct T{g: u64} public new(v: u64): V#Self.T { return T{v: move(v)}; } public change(this: &mut V#Self.T) { let g: &mut u64; g = &mut move(this).g; *move(g) = 3; return; } public get(this: &mut V#Self.T): u64 { let x: &u64; x = &move(this).g; return *move(x); } } //! new-transaction import {{default}}.B; main() { let x: V#B.T; let y: u64; x = B.new(1); B.change(&mut x); y = B.get(&mut x); assert(move(y) == 3, 42); return; }