Anticipatory breach

Q.
What is anticipatory breach? Give an example for it.

A.
Wikipedia has the below definition of 'Anticipatory Breach':

Anticipatory repudiation, also called an anticipatory breach, is a term in the law of contracts that describes a declaration by the promising party to a contract, that he or she does not intend to live up to his or her obligations under the contract.[1]

Wikipedia search 'Anticipatory Breach'

For example, if A promises to give B a unique sculpture in exchange for B painting A's house, but A then sells the sculpture to C before B begins the job, this act by A constitutes an anticipatory repudiation which excuses B from performing. Once the sculpture has left A's possession, there is no way that A can fulfill the promise to give the sculpture to B.

A breach by anticipatory repudiation (or simply anticipatory breach) is an unequivocal indication that the party will not perform when performance is due, or a situation in which future non-performance is inevitable. An anticipatory breach gives the non-breaching party the option to treat such a breach as immediate, and, if repudiatory, to terminate the contract and sue for damages (without waiting for the breach to actually take place).

For example, A contracts with B on January 1 to sell 500 quintals of wheat and to deliver it on May 1. Subsequently, on April 15 A writes to B and says that he will not deliver the wheat. B may immediately consider the breach to have occurred and file a suit for damages for the scheduled performance, even though A has until May 1 to perform.

Example: if Company A refuses to pay substantial interim payments to Company B, Company B can begin legal action due to anticipatory breach. Company B could also stop performing its contractual obligation, potentially saving time and or money.

There is no specific phrase of 'anticipatory breach' in Contracts Act, 1950. The provision of s.40 as below provides guidance to promisee who knows that the promisor would no more carry out the contract in full.

Effect of refusal of party to perform promise wholly
40. When a party to a contract has refused to perform, or disabled himself from performing, his promise in its entirety, the promisee may put an end to the contract, unless he has signified, by words or conduct, his acquiescence in its continuance. 

In such situation, the promisee can immediately sue for breach of contract and demand compensation as in s.74.

PART VII
OF THE CONSEQUENCES OF BREACH OF CONTRACT

Compensation for loss or damage caused by breach of contract
74. (1) When a contract has been broken, the party who suffers by the breach is entitled to receive, from the party who has broken the contract, compensation for any loss or damage caused to him thereby, which naturally arose in the usual course of things from the breach, or which the parties knew, when they made the contract, to be likely to result from the breach of it.

(2) Such compensation is not to be given for any remote and indirect loss or damage sustained by reason of the breach. Compensation for failure to discharge obligation resembling those created by contract

(3) When an obligation resembling those created by contract has been incurred and has not been discharged, any person injured by the failure to discharge it is entitled to receive the same compensation from the party in default as if the person had contracted to discharge it and had broken his contract.

What is key in anticipatory breach is immediately such happening of non-compliance to contract term would ignite breach, without having to wait to the lapse of time, if any, specified in the contract.

Going from here, the promisee can immediately rescind (revoke) the contract and substantiate the claim under s.74 above and s.76 below.

Party rightfully rescinding contract entitled to compensation
76. A person who rightly rescinds a contract is entitled to compensation for any damage which he has sustained through the non-fulfilment of the contract.

Ref:
Thanks to Angie Ng for the idea in this post.
https://en.m.wikipedia.org/wiki/Anticipatory_repudiation
https://en.m.wikipedia.org/wiki/Breach_of_contract

S.40, s.74 & s.76 Contracts Act 1950.