حَدَّثَنَا الْحَكَمُ بْنُ الْمُبَارَكِ، أنبأنا الْوَلِيدُ، عَنْ حَفْصٍ، عَنْ مَكْحُولٍ: "فِي الرَّجُلِ يُوصِي لِلرَّجُلِ بِدَنَانِيرَ فِي سَبِيلِ اللَّهِ، فَيَمُوتُ الْمُوصَى لَهُ قَبْلَ أَنْ يَخْرُجَ بِهَا مِنْ أَهْلِهِ، قَالَ: هِيَ إِلَى أَوْلِيَاءِ الْمُتَوَفَّى الْمُوصِي، يُنْفِذُونَهَا فِي سَبِيلِ اللَّهِ".
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 he sets out with them from his family, he said: They go back to the heirs of the deceased testator, who are to execute this bequest in the way of Allah.
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 testator, 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).
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.