Jabir reported the Prophet as saying, “Prayer should not be said over an infant which has not uttered a sound, neither may he inherit nor leave an inheritance.”
Tirmidhi and Ibn Majah transmitted it, but the latter did not mention “nor leave an inheritance”.