In this hadith, she was pregnant, and he denied her pregnancy. Her son used to be ascribed to her, and then the practice was established regarding inheritance that he inherits from her and she inherits from him whatever Allah has prescribed for her.
حدثنا سليمان بن داود العتكي حدثنا فليح عن الزهري
في هذا الحديث وكانت حاملا فأنكر حملها فكان ابنها يدعى إليها ثم جرت السنة في الميراث أن يرثها وترث منه ما فرض الله عز وجل لها