We were with Umar between Mecca and Medina when he began telling us about the people of Badr. He said, "The Messenger of Allah ﷺ showed us the day before the battle the very spots where they would fall. He would say, 'This is where so-and-so will fall tomorrow, if Allah wills.'"Umar said, "By the One who sent him with the truth, they did not miss those spots. Then they were thrown into a well, and the Prophet ﷺ came to them and called out, 'So-and-so, son of so-and-so, so-and-so, son of so-and-so, have you found what your Lord promised you to be true? For I have indeed found what Allah promised me to be true.'"Umar said, "Are you speaking to bodies that have no souls in them?"He replied, "You do not hear what I say better than they do."
أخبرنا عمرو بن علي قال حدثنا يحيى قال حدثنا سليمان وهو ابن المغيرة قال حدثنا ثابت
كنا مع عمر بين مكة والمدينة أخذ يحدثنا عن أهل بدر فقال إن رسول الله ﷺ ليرينا مصارعهم بالأمس قال هذا مصرع فلان إن شاء الله غدا قال عمر والذي بعثه بالحق ما أخطئوا تيك فجعلوا في بئر فأتاهم النبي ﷺ فنادى يا فلان بن فلان يا فلان بن فلان هل وجدتم ما وعد ربكم حقا فإني وجدت ما وعدني الله حقا فقال عمر تكلم أجسادا لا أرواح فيها فقال ما أنتم بأسمع لما أقول منهم
Reference, its takhrij: reported by Muslim in "Paradise and its Delights," chapter, "The presentation of the deceased's place in Paradise and Hell before him," etc., hadith no. 2873, 1779, from the hadith of Thabit Bunani, in full. It is also in Kubra, hadith no. 2201.