Tafsir of Surah Al-Ghaafir 40:34
﴿وَلَقَدْ جَاءَكُمْ يُوسُفُ مِن قَبْلُ بِالْبَيِّنَاتِ فَمَا زِلْتُمْ فِي شَكٍّ مِّمَّا جَاءَكُم بِهِ حَتَّىٰ إِذَا هَلَكَ قُلْتُمْ لَن يَبْعَثَ اللَّهُ مِن بَعْدِهِ رَسُولًا كَذَٰلِكَ يُضِلُّ اللَّهُ مَنْ هُوَ مُسْرِفٌ مُّرْتَابٌ﴾
Translation of the meaning
And Joseph had already come to you before with clear proofs, but you remained in doubt of that which he brought to you, until when he died, you said, 'Never will Allāh send a messenger after him.' Thus does Allāh leave astray he who is a transgressor and skeptic."
English Translation - Noor International Center — v1.1.2 · QuranEnc.comThe words of the two imams are given in their original Arabic, verbatim, with references.
Shaykh al-Islam Ibn Taymiyyah
ولكن من ظن أن الله لا يرسل إليه رسولا وأنه يترك سدى مهملا لا يؤمر ولا ينهى فهذا أيضا مما ذمه الله«مجموع الفتاوى» 16/496