(1) Contractual gifts and contractual burdens are governed by the provisions applying to testamentary gifts and testamentary burdens accordingly.
(2) The provision of section 2077 also applies to a contract of inheritance between spouses, life partners or engaged persons to the extent that a third party is provided for.