Malaysia legislation
Section 57
Section 57
Effect of failure when time is not essential
(2)
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.
Contracts 41
Compensation for loss through non-performance of act known to be impossible or unlawful
(3)
Where one person has promised to do something which he knew, or, with reasonable diligence, might have known, and which the promisee did not know, to be impossible or unlawful, the promisor must make compensation to the promisee for any loss which the 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 practise 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 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.
Reciprocal promise to do things legal, and also other things illegal