A man brought another man, holding him by the opening in his shirt, to the first caliph, Hazrat Abu Bakr (RA), and said to the caliph, “This man says that he was discharged by dreaming adultery with my mother last night.”
The caliph wondered as to what he should say in the matter. Hazrat Ali (A) who was also present in the mosque at the time said to the caliph. “In such a case the justice is this that the man who has described his dream to the other man should be made to stand in the sun-shine and the punishment orders should be carried out on his shadow as he dreamt adultery only in a dream and the man should also be struck with one or two whips, so that he should not trouble people with such loose talk in future.”
(Manaqib Shehr Aashob vol. 2, p. 179).