module Test { resource T { i: u64 } public test() { let t: R#Self.T; let t_ref: &mut R#Self.T; let i_ref: &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 = ©(t_ref).i; release(move(t_ref)); assert(*move(i_ref) == 0, 42); t_ref = borrow_global(copy(sender)); release(move(t_ref)); return; } } //! new-transaction import {{default}}.Test; main() { Test.test(); return; }