//# publish module 0x1.A { import 0x1.signer; struct T1 has key {v: u64} struct T2 has key {v: u64} // all valid acquires public test1(account: &signer) acquires T1, T2 { let x: &mut Self.T1; let y: &mut u64; label b0: x = borrow_global_mut(signer.address_of(copy(account))); y = Self.get_v(move(x)); Self.acquires_t2(copy(account)); _ = move(y); Self.acquires_t1(move(account)); return; } public test2(account: &signer) acquires T1, T2 { let x: &mut Self.T1; let y: &mut u64; label b0: x = borrow_global_mut(signer.address_of(copy(account))); y = Self.get_v(move(x)); _ = move(y); Self.acquires_t1(copy(account)); Self.acquires_t2(move(account)); return; } public test3(account: &signer) acquires T1, T2 { let x: &mut Self.T1; let y: &mut u64; label b0: x = borrow_global_mut(signer.address_of(copy(account))); y = Self.get_v(move(x)); _ = move(y); Self.acquires_t2(copy(account)); Self.acquires_t1(move(account)); return; } get_v(x: &mut Self.T1): &mut u64 { label b0: return &mut move(x).T1::v; } acquires_t1(account: &signer) acquires T1 { let v: u64; label b0: T1 { v } = move_from(signer.address_of(move(account))); return; } acquires_t2(account: &signer) acquires T2 { let v: u64; label b0: T2 { v } = move_from(signer.address_of(move(account))); return; } }