In Shiva Purana Rudra-samhita, Tarakasura boasted and also disrespected Lord Vishnu before his war with Kartikeya. During his boasting, he also mentioned Rama avatar and Krishna avatar which happened in the future much after the time period of Tarakasura. How did Tarakasura know about future incarnations of Lord Vishnu? These are his dialogues:
Taking birth as Rama he killed a woman (Tāḍakā). Bālī’s death was brought about by him with a vile trick. A brahmin descendant of Viśravas was killed by him. Thus he violated the injunction of the Śruti. Sinful that he was, he forsook his own innocent wife. There too, he violated the path of Śruti for achieving his selfish end. In his sixth incarnation (as Paraśurāma) he cut off the head of his own mother. This wicked man insulted his own preceptor’s son. Incarnating as Kṛṣṇa he defiled the wives of others and forced them to violate the traditional virtues of the family. He contracted his marriages without any reference to the Vedic path. Again in his ninth incarnation he slighted the Vedic path and contrary to its principles, preached and established the atheistic philosophy called Buddhism.