“O Messenger of Allah, will you stay in your house in Makkah?” He said: “Has ‘Aqeel left us any houses?” 'Aqeel had inherited Abu Talib along with Talib. Neither Ja'far nor 'Ali inherited anything because they had been Muslims, and 'Aqeel and Talib had been disbelievers. So on account of that, Omar would say the believer does not inherit from the disbeliever. And Usamah said: the Messenger of Allah ﷺ said "The Muslim does not inherit from the disbeliever nor the disbeliever from the Muslim."
أَنَّهُ قَالَ يَا رَسُولَ اللَّهِ أَتَنْزِلُ فِي دَارِكَ بِمَكَّةَ قَالَ وَهَلْ تَرَكَ لَنَا عَقِيلٌ مِنْ رِبَاعٍ أَوْ دُورٍ وَكَانَ عَقِيلٌ وَرِثَ أَبَا طَالِبٍ هُوَ وَطَالِبٌ وَلَمْ يَرِثْ جَعْفَرٌ وَلاَ عَلِيٌّ شَيْئًا لأَنَّهُمَا كَانَا مُسْلِمَيْنِ وَكَانَ عَقِيلٌ وَطَالِبٌ كَافِرَيْنِ فَكَانَ عُمَرُ مِنْ أَجْلِ ذَلِكَ يَقُولُ لاَ يَرِثُ الْمُؤْمِنُ الْكَافِرَ وَقَالَ أُسَامَةُ قَالَ رَسُولُ اللَّهِ ﷺ لاَ يَرِثُ الْمُسْلِمُ الْكَافِرَ وَلاَ الْكَافِرُ الْمُسْلِمَ