SHAFAQNA – The Grand Ayatollah Safi issued a Fatwa about mentioning an unborn child in a will.
A person who is mentioned in a will to be given something (from the inheritance) must be in existence. Therefore, if it is mentioned in the will that something to be given to the child of a woman who may get pregnant in the future; the will is void. But if it is mentioned in the will that something to be given to the unborn child who is in the stomach of the mother, even though that child still has no soul, the will is correct. Then, if the child is born alive, whatever is mentioned in the will must be given to the child and if the child is born dead, the will is void, and whatever belongs to the dead child in the will, be divided among other inheritors.
Source: PERSIAN SHAFAQNA