French copyright law for posthumous works (a book) quotes the relevant bit of French law. This shows why transfer of copyright is impossible: the law states explicitly who owns the copyright. A contract cannot change this.
So, after the death of an author the heirs own the copyright, not because it was part of the estate, but because copyright law states so.
I don't see a specific restriction on just the transfer of economic rights, but the moral right to be acknowledged as the author (droit de paternité) is a moral right that by its very nature does not lend itself to transfer. The right to stop distribution however is transferred. Perpetual licenses are impossible.
So, with that in mind, the Stack Overflow terms ("any and all content [...] is perpetually and irrevocably licensed to Stack Overflow") are void in France.