and provisions of the will appointing the former spouse executor or trustee or conferring a power of appointment on the former spouse shall take effect as if the former spouse had died on the date on which the marriage is dissolved unless a contrary intention appears in the will;