First scenario
Declarer plays a diamond, dummy says "having none" and it is established that declarer thought a diamond had been played by dummy; and even if he said "heart" it was not his intention.
We read Law 45C4(b):
Quote
Until his partner has played a card a player may change an unintended designation if he does so without pause for thought. ...
and decide that in the case of declarer calling a card from dummy, "until his partner has played" must mean "until declarer has played from his own hand"?
So in this scenario it is too late to change the unintended designation. If the diamond played by declarer is a revoke, it is corrected, and play continues.
Second scenario
Declarer does not play, instead he asks RHO "having none" and it is established that declarer thought a diamond had been played by dummy. As soon as declarer realised that dummy had heard "heart", declarer corrected the designation to "diamond".
Is declarer in time to change the unintended designation?
Was there a "pause for thought"?
When does the "pause for thought" start?
In Law 25A, there is an official "interpretation" that "pause for thought" starts when the players becomes aware of his unintended/inadvertent action - does that apply here?