A child, born after the making of a will, who is entitled to succeed to a part of the real or personal property of the testator, or a subscribing witness to a will, who is entitled to succeed to a share of such property, may maintain an action against the legatees or devisees, as the case requires, to recover his or her share of the property; and he or she is subject to the same liabilities and has the same rights, and is entitled to the same remedies, to compel a distribution or partition of the property, or a contribution from other persons interested in the estate, or to gain possession of the property, as any other person who is so entitled to succeed.