A legal heir has no right to inherit through a will
باب لاَ وَصِيَّةَ لِوَارِثٍ
Sahih al-Bukhari, Book of Wills and Testaments (Wasaayaa)(view book)
Sahih al-Bukhari 2747
Narrated Ibn 'Abbas:
The custom (in old days) was that the property of the deceased would be inherited by his offspring;
as for the parents (of the deceased), they would inherit by the will of the deceased. Then Allah cancelled from that custom whatever He wished and fixed for the male double the amount inherited by the female, and for each parent a sixth (of the whole legacy) and for the wife an eighth or a fourth and for the husband a half or a fourth.
حَدَّثَنَا مُحَمَّدُ بْنُ يُوسُفَ، عَنْ وَرْقَاءَ، عَنِ ابْنِ أَبِي نَجِيحٍ، عَنْ عَطَاءٍ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ قَالَ كَانَ الْمَالُ لِلْوَلَدِ، وَكَانَتِ الْوَصِيَّةُ لِلْوَالِدَيْنِ، فَنَسَخَ اللَّهُ مِنْ ذَلِكَ مَا أَحَبَّ، فَجَعَلَ لِلذَّكَرِ مِثْلَ حَظِّ الأُنْثَيَيْنِ، وَجَعَلَ لِلأَبَوَيْنِ لِكُلِّ وَاحِدٍ مِنْهُمَا السُّدُسَ، وَجَعَلَ لِلْمَرْأَةِ الثُّمُنَ وَالرُّبْعَ، وَلِلزَّوْجِ الشَّطْرَ وَالرُّبُعَ.