"And what (harm) would have come to them if they had believed in Allah and the Last Day and spent from what Allah had provided them," meaning: the obligatory Zakat. "And Allah is ever, of them, Knowing," that is: Knowing that they are polytheists.
Muhammad said: His saying "And what (harm) would have come to them" means: what thing would have come to them (what is the harm to them)?
﴿وَمَاذَا عَلَيْهِمْ لَوْ آمَنُوا بِاللَّهِ وَالْيَوْمِ الآخِرِ وَأَنْفَقُوا مِمَّا رَزَقَهُمُ الله﴾ يَعْنِي: الزَّكَاة الْوَاجِبَة ﴿وَكَانَ اللَّهُ بهم عليما﴾ أَي: عليما بِأَنَّهُم مشركون.
قَالَ مُحَمَّد: قَوْله ﴿وماذا عَلَيْهِم﴾ الْمَعْنى: أَي شَيْء عَلَيْهِم؟.