//# publish module 0x1.A { import 0x1.signer; struct T1 has key {v: u64} struct T2 has key {v: u64} 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; } public test1(account: &signer) acquires T1, T2 { let x: &mut Self.T1; label b0: x = borrow_global_mut(signer.address_of(copy(account))); Self.acquires_t2(copy(account)); // error T1 still acquired Self.acquires_t1(move(account)); _ = move(x); return; } } //# publish module 0x1.A2 { import 0x1.signer; struct T1 has key {v: u64} struct T2 has key {v: u64} 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; } public test2(account: &signer) acquires T1, T2 { let x: &mut Self.T1; label b0: x = borrow_global_mut(signer.address_of(copy(account))); Self.acquires_t2(copy(account)); // error T1 still acquired Self.acquires_t1(move(account)); _ = move(x); return; } } //# publish module 0x1.A2 { import 0x1.signer; struct T1 has key {v: u64} struct T2 has key {v: u64} 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; } public test3(account: &signer) acquires T1, T2 { let x: &mut Self.T1; label b0: x = borrow_global_mut(signer.address_of(copy(account))); // error T1 still acquired Self.acquires_t1(copy(account)); _ = move(x); Self.acquires_t2(move(account)); return; } }