Good point, and an important example why static types are ultimately a failure: Encoding the actual invariants in them you care about is a pain in the ass.
No doubt there will be plenty of comments to your comment trying to rationalise this.
Why do you believe that static types are ultimately a failure?
I strongly disagree. Static types are a huge success. The problem here is essentially that they named things badly.
Better than simply not encoding the actual invariants you care about.