He—may Allah Most High have mercy on him—was asked:
A man suffered an illness that continued until his death. He ordered his wife to leave the house, but she hesitated to leave, so he said to her, “You are divorced.” She went out and covered her face from him. He then called for her, and she came to him with her face covered. When he asked why she was covering her face, she told him of the divorce he had pronounced. He denied it, saying, “I neither swore an oath nor pronounced a divorce.” He died a few days later. Does the divorce take effect in her case, or must she observe the waiting period following his death?
He replied:
She must observe the waiting period following his death as well as the waiting period for divorce, and she is entitled to inherit from him. This applies if he was in possession of his faculties when he pronounced the divorce. If he was not in possession of his faculties, she is required to observe only the waiting period following his death. And Allah knows best.