Such a law would violate the United States Constitution.
Art I Section 10: No State shall . . . pass any . . . Law impairing the Obligation of Contracts.
“Such a law would violate the United States Constitution.”
So, what’s yer point?