Inspired by this question over on workplace.SE - Severance contract requires a lie. Is this enforceable?
If you sign a contract wherein you agree to do something illegal, but have no intention of committing the act (and never actually do), is that still illegal itself?
In the linked question, the OP is required to lie about the reason he left a company (i.e. say that he voluntarily quit when he was actually laid off) which could mean lying to the social welfare office, which would be illegal.
Presumably he cannot be legally bound to commit an illegal act and his company would fail if they tried to sue him for breach of the contract in this case. But could the law take exception to the fact that he signed it, thereby making the agreement in the first pace?
After all, it would be signing a contract in bad faith, and also creates a small legal mess.
(OTOH maybe the onus is on the person writing the contract to make sure everything they want the signer to do is legal)
A hypothetical question, that originated in the United States but also interested in other jurisdictions.