For every intent and purpose, the person I'm replying to is, with an equivalent level of straw-man-ness, which is why I phrased it this way.
> So if you claim your type system is going to keep your refactoring safe, I'd say that I'm not the one being delusional.
No, I'm claiming that there are entire categories of bugs that are protected this way, not that it provides universal safety.
> And of course unit tests also tend to, in practice, catch the errors that are caught by types. If you check that a value is equal to 10 rather than 9, you've also implicitly checked that it is not of type PinkElephant.
It provides that if and only if the code invoking the tested function is called with arguments using the same semantics as the ones exercised in the tests, which is impossible to enforce in a dynamic language. I'd even go so far as saying that it is axiomatically impossible for unit testing to be a truly reliable tool in such languages because of the lack of precondition enforcement.