The next several questions concern this code:
asset class Money {…}
asset class Bank {
Money@Owned myMoney;
void depositMoney(Money @ Owned >> Unowned deposit) { … }
Money@Owned withdrawMoney() {…} // Withdraws all money
}
class Test {
Bank b;
void putMoneyInBank(Money @ Owned >> Unowned m) {
// At the beginning of this method, m owns an instance of Money.
Money q = m; [m @ Unowned]; // Location (A)
b.depositMoney(q); [q @ Unowned]; // Location (B)
// Location (C)
b.depositMoney(b.withdrawMoney()) // Location (D)
}
}
At the beginning of putMoneyInBank()
, what is the type of m
?