An agreement to do an act impossible in itself is void.
Contract to do act afterwards becoming impossible or unlawful: A contract to do an act which, after the contract is made, becomes impossible or, by reason of some event which the promisor could not prevent, unlawful, becomes void when the act becomes impossible or unlawful.
Compensation for loss through non-performance of act known to be impossible or unlawful: Where one person has promised to be something which he knew or, with reasonable diligence, might have known, and which the promisee did not know to be impossible or unlawful, such promisor must make compensation to such promisee for any loss which such promisee sustains through the non-performance of the promise.
(a) A agrees with B to discover treasure by magic. The agreement is void.
(b) A and B contract to marry each other. Before the time fixed for the marriage, A goes mad. The contract becomes void.
(c) A contracts to marry B, being already married to C, and being forbidden by the law to which he is subject to practice polygamy. A must make compensation to B for the loss caused to her by the non-performance of his promise.
(d) A contracts to take in cargo for B at a foreign port. A’s Government afterwards declares war against the country in which the port is situated. The contract becomes void when war is declared.
(e) A contracts to act at a theatre for six months in a consideration of a sum paid in advance by B. On several occasions A is too ill to act. The contract to act on those occasions becomes void.