Let's say I build my code so that I inject ALL dependencies to every class and when I test, I replace those dependencies with test doubles. Let's also say that when I work on a class I run its tests to test it. Given that a regression is an unexpected failure in a part of the codebase other than that which I changed, it must be due to code (say in class X) which has a dependency on some code I changed being broken by a change in the behaviour of my code. However, class X's dependencies have been replaced with test doubles when it is being tested and those have not changed. Therefore the unit tests on X will not fail. Therefore my unit tests will not catch any regressions caused by my changes.
Is this correct?
(I'm not interested in an explanation of why it is necessary for unit tests to not test dependencies, I'm assuming that's the case and questioning the consequences)