Quebec's Civil Code, at §1671, states that confusion extinguishes an obligation.
At §1683:
"Where the qualities of creditor and debtor are united in the same person, confusion is effected, extinguishing the obligation. Nevertheless, in certain cases where confusion ceases to exist, the effects cease also."
Similarly, the 2009 version of the Civil Code of Louisiana, at §1903:
"When the qualities of obligee and obligor are united in the same person, the obligation is extinguished by confusion."
In officially translating their Civil Code for the purposes of the European Union, the French decided to translate confusion (which is used in the French version) with deference to the common law term merger, as follows at §1300 of the 209 edition of the Civil Code of France:
"Where the capacities of creditor and debtor are united in the same person, a merger is made as of right which extinguishes both claims."
An example of confusion is where A owes B $5,000. B dies and in his will, he makes A his only heir. The debt is extinguished as A is both debtor to the estate but also the estate itself, and therefore creditor, as sole heir.
REFERENCES: