Static analysis using static typing gives you almost nothing at all in practice.
It searches for a very narrow and rare set of bugs, which hardly ever happen.
Typing really exists to help a compiler, it's not a code correctness tool in the way you envision.