From Jaabir, may Allaah be pleased with him, who said, “When the time of the Battle of Uhud approached, my father called me at night and said, “I think that I will be the first amongst the Companions of the Prophet to be martyred. I do not leave anyone after me dearer to me than you, except Allah’s Apostle’s soul and I owe some debt and you should repay it and treat your sisters favourably (nicely and politely).” So in the morning he was the first to be martyred and was buried along with another (martyr).” [Bukhaari]

Shaikh al-Albaani said, “It should be known that this is not to be considered as having knowledge of the Unseen, for no-one except Allaah knows the Unseen, and nor is it from the category of Allaah showing His servants some of the Unseen as many ignorant people think it is, for Allaah the Most High said, “[He is] Knower of the unseen, and He does not disclose His [knowledge of the] unseen to anyone except a Messenger He has approved of.” [Jinn 72:26-27] [i.e., Jaabir’s father was a Companion not a Messenger]

Rather [this incident] comes under the category of truthful inspiration [al-Ilhaam as-Saadiq], and the difference between it and revelation [wahy] is that inspiration [al-Ilhaam] is not safe from error or the fact that it may not materialise, unlike revelation [wahy] which is always infallible.”

Tahqiq Mishkaah al-Masaabih, 3/1674.