“If the child has cired, the (funeral) prayer should be offered for him (if he dies) and he is an heir.”
Sunan Ibn Majah Book 23, Hadith 32