It is narrated from al-Sha'bi (may Allah have mercy on him) that Sayyiduna Ali and Sayyiduna Zayd bin Thabit (may Allah be pleased with them both) said: Slaves and the People of the Book are like the dead. And Sayyiduna Abdullah (may Allah be pleased with him) said: They can exclude (others), but they cannot inherit.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الفرائض / 12261