When an agreement is discovered to be void, or when a contract becomes void, any person who has received any advantage under such agreement or contract is bound to restore, it, or to make compensation for it, to the person from whom he received it.
(a) A pays B 1,000 rupees, in consideration of B’s promising to marry C, A’s daughter. C is dead at the time of promise. The agreement is void, but B must repay A the 1,000 rupees.
(b) A contracts with B to deliver to him 250 maunds of rice before the first of May. A delivers 130 maunds only before that day, and none after. B retains the 130 maunds after the first of May. He is bound to pay A for them.
(c) A, a singer, contracts with B, the manager of a theatre, to sing at his theatre for two nights in every week during the next two months, and B engages to pay her hundred rupees for each night’s performance. On the sixth night, A willfully absents herself from the theatre, and B, in consequence, rescinds the contract. B must pay A for the five nights on which she had sung.
(d) A contracts to sing for B at a concert for 1,000 rupees, which are paid in advance. A is too ill to sing. A is not bound to make compensation to B for the loss of profit which B would have made if A had been able to sing, but must refund to B the 1,000 rupees paid in advance.