module Test { resource T { i: u64 } public test() { let t: R#Self.T; let t_ref: &mut R#Self.T; let i_ref: &mut u64; let sender: address; t = T { i: 0 }; move_to_sender(move(t)); sender = get_txn_sender(); t_ref = borrow_global(copy(sender)); i_ref = &mut copy(t_ref).i; release(move(t_ref)); *move(i_ref) = 1; t_ref = borrow_global(copy(sender)); release(move(t_ref)); return; } } //! new-transaction import {{default}}.Test; main() { Test.test(); return; }