It was reported from the Prophet ﷺ that he came upon a heavily pregnant woman at the entrance of a tent. He asked, "Perhaps the man intends to have intercourse with her?"They said, "Yes."The Messenger of Allah ﷺ said, "I was about to curse him with a curse that would enter the grave with him. How can he claim the child as his heir when it is not lawful for him? How can he make use of the child as his own when it is not lawful for him?"
و حدثني محمد بن المثنى حدثنا محمد بن جعفر حدثنا شعبة عن يزيد بن خمير قال سمعت عبد الرحمن بن جبير يحدث عن أبيه
عن النبي ﷺ أنه أتى بامرأة مجح على باب فسطاط فقال لعله يريد أن يلم بها فقالوا نعم فقال رسول الله ﷺ لقد هممت أن ألعنه لعنا يدخل معه قبره كيف يورثه وهو لا يحل له كيف يستخدمه وهو لا يحل له