The tradition mentioned above has also been transmitted by Sahl bin Sa’d through a different chain of narrators. This version has “She was pregnant, he denied pregnancy from him. So her son was attributed to her. In the law of succession the practice (sunnah) was established that the son gets a share in the inheritance of his mother and the mother gets the share in the inheritance of her son according to the shares prescribed by Allaah the Exalted.
أَنْ يَرِثَهَا وَتَرِثَ مِنْهُ مَا فَرَضَ اللَّهُ ﷻ لَهَا