The Prophet (ﷺ) as saying: If anyone dies when some fast is due from him (i.e. which he could not keep) his heir must fast on his behalf.

Abu Dawud said: This applies to the fast which a man vows ; and this is the opinion of Ahmad b. Hanbal.
Sunan Abi Dawud Book 14, Hadith 88