In your dream, him telling you he was going to die might've been giving you time to prepare for his departure (especially if his death was unexpected). Giving you an outlet for your emotions - letting you say 'good-bye' while he was still with you all.