Yes but why do we write the last bit as an aside as if that’s not a massive yawning black hole for errors to hide in? All the other stuff is irrelevant, just like when Haskell and Rust people claim that if their code compiles it is correct.
Because in practice, it's very straightforward to check that all of the types for class members are what you expect. Especially when you actually use that class in other code. You have things in mind that the class should do. If you get compile errors doing those things, you notice the inconsistency.