Abu Ishaq al-Sabi'i said: It was narrated to me that Sayyiduna Ali (may Allah be pleased with him) considered such a bequest to be permissible. (That is), according to the statement of Hasan (may Allah have mercy on him), he also said this.
Hadith Referenceسنن دارمي / من كتاب الوصايا / 3335
Hadith Takhrijاس حدیث کی سند بھی اشعث کی وجہ سے ضعیف ہے۔ دیکھئے: [ابن أبى شيبه 10987]
Brief Explanation
(Commentary on Ahadith 3332 to 3335) If these statements are considered correct, then the meaning would be that if the legatee (the one for whom the bequest is made) dies before the testator (the one making the bequest), then this bequest will transfer to the heirs of the legatee. And Allah knows best.