Hadith 3333
حَدَّثَنَا الْحَكَمُ بْنُ الْمُبَارَكِ، أنبأنا الْوَلِيدُ، عَنْ حَفْصٍ، عَنْ مَكْحُولٍ: "فِي الرَّجُلِ يُوصِي لِلرَّجُلِ بِدَنَانِيرَ فِي سَبِيلِ اللَّهِ، فَيَمُوتُ الْمُوصَى لَهُ قَبْلَ أَنْ يَخْرُجَ بِهَا مِنْ أَهْلِهِ، قَالَ: هِيَ إِلَى أَوْلِيَاءِ الْمُتَوَفَّى الْمُوصِي، يُنْفِذُونَهَا فِي سَبِيلِ اللَّهِ".
It is narrated from Mak'hool (may Allah have mercy on him): If a man makes a bequest to spend dinars in the way of Allah for someone, and the one for whom the bequest was made passes away before the testator, he said: Before it leaves the hands of the heirs of the testator, such a bequest is permissible for the heirs of the one for whom the bequest was made. He also said: It is the responsibility of the heirs of the deceased testator to execute this bequest in the way of Allah.
Hadith 3334
It is narrated from Hasan (may Allah have mercy on him): If a man makes a will for someone, and the legatee (the one for whom the will is made) dies before the executor, Hasan (may Allah have mercy on him) said: Such a will shall be valid for the heirs of the legatee (i.e., the one for whom the will was made).
Hadith 3335
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.